Box icon indicating copy to clipboard operation
Box copied to clipboard

Unexpected attributes "size" and "compute"

Open wtld opened this issue 2 years ago • 2 comments

Is it correct?

In [1]: from box import Box

In [2]: test = Box(default_box=True)

In [3]: test Out[3]: Box({'size': {'compute': {}}})

In [4]: test.keys() Out[4]: dict_keys(['size'])

Python 3.11.6 Box 7.1.1

wtld avatar Dec 09 '23 13:12 wtld

That seems like it was added by the interpreter you are using. Are you using ipython or something other than standard cpython console?

cdgriffith avatar Dec 14 '23 02:12 cdgriffith

Thank you, you are right. It's from iPython in Spyder IDE. I checked in regular python and it does not occur. Interestingly, these attributes are not only printed, but they have actually been added to the object,

wtld avatar Dec 14 '23 10:12 wtld