issubclass(dict, Mapping)

Antoine Pitrou solipsis at pitrou.net
Wed Dec 22 09:56:36 EST 2010


On Wed, 22 Dec 2010 09:35:48 -0500
Adam Tauno Williams <awilliam at whitemice.org> wrote:
> 
> IMO, the "object model" isn't "leaky", it is simply "adhoc" and not
> really a "model" at all [write as many 800 page books as you want: if it
> walks like a zombie duck, smells like a zombie duck - it is still a
> zombie duck].  Performing introspection in Python is awful and a
> veritable land-mine of "implementation details".

Introspection is fine as long as you stick to officially promoted tools
such as isinstance(), issubclass(), dir() or the inspect module.
If you start looking inside the pants of the object model, you can have
surprises :)

Regards

Antoine.





More information about the Python-list mailing list