Hooks, aspect-oriented programming, and design by contract

Pedro Rodriguez pedro_rodriguez at club-internet.fr
Wed Jan 23 22:45:48 CET 2002


"Alex Martelli" <aleax at aleax.it> wrote:

<wise remarks snipped>

> In Python 2.2 the dir of a class also gives you the attributes (methods
> or data ones) which come through inheritance, in 2.1 and earlier, it
> does not.  So, again, if you need to support both old and new versions,
> you need to discriminate.  Ugly, yes, but only for the relatively rare
> need of doing metaprogramming (introspection etc) on both old and new
> versions of Python from the same source-code base.
> 

Thanks Alex. I will try to do my best to cope with all versions, and, as
you stated it, this only happens into rare case of metaprogramming, but
it may be worth it.

Thanks for taking time,
-- 

Pedro





More information about the Python-list mailing list