-
Notifications
You must be signed in to change notification settings - Fork 107
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
default_box does not work with box_dots #192
Comments
To be honest it would probably be a lot easier programmatically to say that everything with dots is always changed for box dots. Such a breaking change would require a major version bump (which I am not against), but also not something I have the cycles to work on myself. |
Is this a related problem?
That is |
…te keys (thanks to Rexbard) * Adding #236 iPython detection to prevent adding attribute lookup words (thanks to Nishikant Parmar) * Adding new DDBox class (Default Dots Box) that is a subclass of SBox
Adding this feature in Box 7! Please test and give feedback if possible box_dots now means all periods should be split! |
* Adding #169 default functions with the box_instance and key parameter (thanks to Коптев Роман Викторович) * Adding #170 Be able to initialize with a flattened dict - by using DDBox (thanks to Ash A.) * Adding #192 box_dots treats all keys with periods in them as separate keys (thanks to Rexbard) * Adding #211 support for properties and setters in subclasses (thanks to Serge Lu and David Aronchick) * Adding #226 namespace to track changes to the box (thanks to Jacob Hayes) * Adding #236 iPython detection to prevent adding attribute lookup words (thanks to Nishikant Parmar) * Adding #238 allow ``|`` and ``+`` for frozen boxes (thanks to Peter B) * Adding new DDBox class (Default Dots Box) that is a subclass of SBox * Fixing #235 how ``|`` and ``+`` updates were performed for right operations (thanks to aviveh21) * Fixing #234 typos (thanks to Martin Schorfmann) * Fixing no implicit optionals with type hinting
Added in 7.0.0 |
This behaviour is noted in the Wiki, but I don't agree it is as it should be.
Using default_box, one can create and modify a new dotted chain as expected:
However, when trying to create a new value using box_dots, it does not work as I expect (again the demonstrated behavior is noted in the Wiki).
By declaring box_dots=True the programmer has explicitly stated they want to interpret the periods as field separators. It seems that the above code should return the same as the first code block.
Since I require this behavior, I have to split the index string and create empty boxes, then perform the
b["a.b.c"]=1
for it to work as intended.The text was updated successfully, but these errors were encountered: