[Python-ideas] Enhancing vars()
Alexander Belopolsky
alexander.belopolsky at gmail.com
Mon Dec 12 22:45:39 EST 2016
More information about the Python-ideas mailing list
Mon Dec 12 22:45:39 EST 2016
- Previous message (by thread): [Python-ideas] Enhancing vars()
- Next message (by thread): [Python-ideas] Enhancing vars()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Dec 12, 2016 at 6:45 PM, Steven D'Aprano <steve at 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__. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161212/4d2bf71a/attachment.html>
- Previous message (by thread): [Python-ideas] Enhancing vars()
- Next message (by thread): [Python-ideas] Enhancing vars()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list