On Wed, Dec 2, 2015 at 3:28 AM, Chris Angelico <ros...@gmail.com> wrote: > On Wed, Dec 2, 2015 at 7:22 PM, Serhiy Storchaka <storch...@gmail.com> wrote: >> >> I use vars() exclusively for introspection in interactive environment. As >> well as dir() and help(). Sad that it doesn't work with __slots__. > > Maybe the upshot of all this is a post to python-ideas recommending > that vars() grow support for __slots__ types? If it's most often used > interactively, this would make it more useful there, and it wouldn't > break backward compatibility unless there's some way that people are > depending on it raising an exception.
Let vars() continue in its antediluvian ways. Maybe the standard library could add an inspect.getdata function that returns a union of an object's __dict__ items and data-descriptor attributes. -- https://mail.python.org/mailman/listinfo/python-list