Skip to content
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

repr fail #62

Open
kgk opened this issue Nov 18, 2024 · 0 comments
Open

repr fail #62

kgk opened this issue Nov 18, 2024 · 0 comments

Comments

@kgk
Copy link

kgk commented Nov 18, 2024

[1] b = Bunch(a=1,b=2)
[2] repr(b)

File ~/lib/python3.10/site-packages/bunch/__init__.py:200, in Bunch.__repr__(self)
    189 """ Invertible* string-form of a Bunch.
    190     
    191     >>> b = Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!')
   (...)
    197     (*) Invertible so long as collection contents are each repr-invertible.
    198 """
    199 keys = self.keys()
--> 200 keys.sort()
    201 args = ', '.join(['%s=%r' % (key, self[key]) for key in keys])
    202 return '%s(%s)' % (self.__class__.__name__, args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant