<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 12, 2016 at 6:45 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1mw" class="a3s aXjCH m158f56da2a9a003e">Proposal: enhance vars() to return a proxy to the object namespace,<br>
regardless of whether said namespace is __dict__ itself, or a number of<br>
__slots__, or both.</div></blockquote></div><br>How do you propose dealing with classes defined in C? Their objects don't have __slots__.</div><div class="gmail_extra"><br></div><div class="gmail_extra">One possibility is to use __dir__ or dir(), but those can return anything and in the past developers</div><div class="gmail_extra">were encouraged to put only "useful" attributes in __dir__.</div></div>