On Mon, Dec 12, 2016 at 6:45 PM, Steven D'Aprano <st...@pearwood.info> wrote:
> Proposal: enhance vars() to return a proxy to the object namespace, > regardless of whether said namespace is __dict__ itself, or a number of > __slots__, or both. > How do you propose dealing with classes defined in C? Their objects don't have __slots__. One possibility is to use __dir__ or dir(), but those can return anything and in the past developers were encouraged to put only "useful" attributes in __dir__.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/