-
Notifications
You must be signed in to change notification settings - Fork 108
Limitations
Chris Griffith edited this page Mar 22, 2020
·
2 revisions
Box is a subclass of dict
and as such certain keys cannot be accessed via dot notation (aka as methods). This is because names such as keys
and pop
have already been declared as methods, so Box cannot use it's special sauce to overwrite them.
However it is still possible to have items with those names in the Box and access them like a normal dictionary, such as my_box['keys']
.
This is as designed, and will not be changed.
These protected keys include : clear, copy, fromkeys, get, items, keys, pop, popitem, setdefault, to_dict, update, merge_update, values
and all the transform methods.
To view an entire list of what cannot be accessed via dot notation, view dir(Box())
.
These documents are for Box 5.0+