This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author apostofes
Recipients apostofes
Date 2022-04-07.22:21:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649370082.57.0.519891152305.issue47254@roundup.psfhosted.org>
In-reply-to
Content
current dir gives output like this,
```
from collection import OrderedDict
od = OrderedDict({'a': 1, 'b': 2, 'c': 3})
print(dir(od))
```
```
['__class__', '__contains__', '__delattr__', '__delitem__', '__dict__',
 '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__',
 '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__',
 '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__',
 '__reduce_ex__', '__repr__', '__reversed__', '__setattr__', '__setitem__',
 '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys',
 'get', 'items', 'keys', 'move_to_end', 'pop', 'popitem', 'setdefault',
 'update', 'values']
```
but wouldn't it be better if the output was like this,
```

{'OrderedDict': {'__contains__', '__delitem__', '__dir__', '__eq__',
                  '__format__', '__ge__', '__getitem__', '__gt__', '__init__', '__init_subclass__',
                  '__iter__', '__le__', '__lt__', '__ne__', '__reduce__', '__reduce_ex__',
                  '__repr__', '__reversed__', '__setitem__', '__sizeof__', '__subclasshook__',
                  'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'move_to_end', 'pop',
                  'popitem', 'setdefault', 'update', 'values'},
'dict': {'__getattribute__', '__len__', '__new__'},
'object': {'__delattr__', '__setattr__', '__str__'}}
```
???
History
Date User Action Args
2022-04-07 22:21:22apostofessetrecipients: + apostofes
2022-04-07 22:21:22apostofessetmessageid: <1649370082.57.0.519891152305.issue47254@roundup.psfhosted.org>
2022-04-07 22:21:22apostofeslinkissue47254 messages
2022-04-07 22:21:22apostofescreate