-
Notifications
You must be signed in to change notification settings - Fork 119
[Bug] Camel killer box and box dots gives unexpected behaviour #300
Copy link
Copy link
Open
Description
Hello! Thank you for this awesome package. The combination of camel killer box and box dots does exactly what I'm looking for. Well, almost - there's a couple of behaviours that are not working quite as I expected. I'm not sure how many of these are bugs or just my expectations are wrong but hopefully you can explain!
from box import Box
b = Box({"someKey": ["a"]}, camel_killer_box=True, box_dots=True)
b["some_key"]
# works as expected: BoxList(['a'])
b["some_key[0]"]
# works as expected: 'a'
b["someKey"]
# works but I don't know if it should? From the docs it sounds like the original camel-case
# version should have been destroyed completely, but this gives BoxList(['a'])
b["someKey[0]"]
# raises BoxKeyError - not sure whether this should work, but given that just "someKey" worked above
# it feels inconsistent at any rate
b["SomeKey"]
# works but I wouldn't expect it to! Is this meant to work?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels