apostofes <aivainjr...@gmail.com> added the comment:
plus I would want it to have some more methods, ``` l = [1, 2, 3] ``` using enhanced dir should give, ``` {'list': {'__add__', '__contains__', '__delitem__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__repr__', '__reversed__', '__rmul__', '__setitem__', '__sizeof__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'}, 'object': {'__delattr__', '__dir__', '__format__', '__reduce__', '__reduce_ex__', '__setattr__', '__str__'}} ``` obtained from, (here only printing, made a dictionary in the implementation in the PR) ``` for j in dir(l): print(f'l.{j}.__qualname__') ``` this check fails for, ``` {'list': {'__doc__', '__hash__', '__class__'}} ``` I would also want these, ``` {'list': {'__instancecheck__','__subclasscheck__', '__subclasses__', 'mro'}, 'type': {'__call__', '__prepare__'}} ``` which were obtained from, ``` for j in set(dir(type(l))) - set(dir(l)): print(f'l.{j}.__qualname__') ``` and it fails for, ``` {'list': {'__abstractmethods__', '__base__', '__bases__', '__basicsize__', '__dict__', '__dictoffset__', '__flags__', '__itemsize__', '__module__', '__mro__', '__name__', '__qualname__', '__text_signature__', '__weakrefoffset__'} ``` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47254> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com