On Thu, 17 Mar 2011 00:12 +1100, "Steven D'Aprano" <st...@pearwood.info>
wrote:
> And here's an example:
> 
>  >>> class C(object):
> ...     pass
> ...
>  >>> hasattr(C, '__eq__')
> True
>  >>> '__eq__' in dir(C)
> False

OTOH, I got True in 3.1.1. As the docs say, detailed behavior may change
across releases.

I suppose there must be some reliable way to get a list of *all* an
object's attributes,
but I don't see it.

-- 
Tom Zych / freethin...@pobox.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to