-
Notifications
You must be signed in to change notification settings - Fork 25
removing support for passing bare storage types #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removing support for passing bare storage types #193
Conversation
|
We should provide wrappers here. Exposing the bare C++ objects gives us no flexibility in the future. The C++ version and the Python version will now have the same repr, rather than one having an upper case and one lower case. I thought that's the design we agreed upon? Your design? |
|
This breaks code that worked in 0.5.2 and even was shown at PyHEP. Now this is an error and not a warning. We don't have that a huge number of users yet, but those we do should be respected for trusting us. |
That is your fault for introducing this in the first place. |
|
I added storage values, which make work and allow lazy people to skip the (). Same synatx without violating strong typing in Python. Now the value is snake_case and the class/type is CamelCase. There is a clear distinction between the two. |
|
By the way, we should have a test for this. |
|
I do not like duplicated Int and int. I have very carefully, module by module, made sure the auto-completion list is clean and helpful without any extra items. What happened to "there should only be one way to do it"? Now you have two identically named storages, and one supports a () and one doesn't, only different by a capital letter. And if a user uses the cpp module, the identically named lower case item is now a type instead of an instance. I prefer your original solution, which I adopted in #196. I also have already told you that we are wrapping the bare objects (also your design). |
|
You are not respecting the design or thought I have put into the Python bindings. |
|
I think we should officially support the shortcuts for storages which do not take arguments. I am not worried about the "clutter" of the auto-completion list of the storage module. |
I accepted many changes that went well beyond my original vision. I think I showed you enough respect. |
|
It is important to me that we have a base class Storage for future type checking. I can implement a strong typing system later that can be checked in mypy, and used in IDEs and things to help users. You are undoing the wrapping I implement in response to #183. Which you happily claimed you were in favor of and that it was your idea. This is an unrelated change to |
|
I don't understand why we need a base class Storage. We need shims for those classes which actually use other classes to do the work, like histogram and the axis. But there is no shimming necessary for the storages. If you want to add a doc string in Python, I think this can be done by assigning |
|
A lot depends on your answer to the question at the bottom of #200. We need a parent class "Storage" so we can implement static type hints eventually and put a type in the doc strings, we need different |
|
Ok, I see your point. I would be ok with having different |
* removing support for passing bare storage types * adding preconfigured instances for lazy people
No description provided.