Skip to content

repr fail #62

@kgk

Description

@kgk
[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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions