On Mar 7, 12:30 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | Hi,
> | Is there a python command that allows me to extract the names (not
> | values) of the attributes of a class.
> |
> | example
> |
> | Class Sample:
> |    fullname = 'Something'
> |
> | How can I know that this class has an attribute called 'fullname'?
>
> >>> class C: a = 1
> >>> dir(C)
>
> ['__doc__', '__module__', 'a']

Thank You
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to