Is there a way to list the attributes of a class without instantiating an object? – stackoverflow.com

In Python 3.5, say I have: class Foo: def __init__(self, bar, barbar): self.bar = bar self.barbar = barbar I want to get the list ["bar", "barbar"] from the class. I know I can ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Is there a way to list the attributes of a class without instantiating an object? – stackoverflow.com"