FEEDBACK WANTED: Type/class unification

Paul Moore gustav at morpheus.demon.co.uk
Sat Jul 28 15:20:05 EDT 2001


On Sat, 28 Jul 2001 15:35:44 GMT, Guido van Rossum <guido at python.org> wrote:

>If there's anyone who believes the type/class unification should not
>become a feature in Python 2.2, please speak up now or forever hold
>your peace...  (But I'd rather you speak up!)

There's a risk that all you get is negative comments, so I'll add mypositive
vote here - I love the new type/class stuff. I don't have a large body of code
in existence, and in particular, I don't tend to do anything subtle which might
be bitten by this, so I'm not a good test of backward compatibility issues, but
I can see cases where I would use the new fetaures - so my vote is "yes".

>I realize the PEPs aren't done yet, but I believe that the separate
>introduction I wrote goes a long way towards explaining type/class
>unification.  Read it here:
>
>  http://www.python.org/2.2/descrintro.html

This is a good introduction, as it treats all of this as user-level features,
and not as wizard-level "black magic". It encouraged me to try some of the
features.

One point - the "get/set method" stuff was quite a surprise to me. It's *not*
something I would see as a consequence of class/type unification, but it is very
welcome. It seems much nicer approach (in the cases where it's appropriate) than
__getattr__ and __setattr__ hooks, in those cases where it's appropriate.

>Any questions, don't hesitate to ask.  Just DON'T CHANGE THE THREAD
>TOPIC.  I don't have time to read the entire newsgroup (I tried this
>week, and I didn't get to anything else :).

A "gentle introduction" to the metaclass stuff would also be nice. However, I
suspect that this is an area which is too deep to allow much simplification...
On the other hand, some relatively simple examples, maybe in the standard
library, or alternatively in the distribution somewhere (and referenced in the
documentation) would be good - maybe (meta)classes like the ones in the
"Metaclasses in Python 1.5" article (enum.py, trace.py, etc).

Hope this is useful feedback,
Paul.



More information about the Python-list mailing list