[EMAIL PROTECTED] wrote:
>     Jim> For debugging purposes, it's easy to add a property to allow
>     Jim> debugging of attribute assignment.
> 
> Assuming you use new-style classes, which I often don't.  The property/debug
> idea that you and Gustavo have both now mentioned makes them a bit more
> attractive.
 >
> Is there a new-style class HOW-TO somewhere?

See http://www.python.org/doc/newstyle.html

 > It would be useful to
> summarize the advantages for them.  I still have this thought stuck in my
> head (from where, I don't know, probably incorrect) that one of the main
> reasons for new-style classes was to get rid of __dict__.

No, the main benefit is to begin to resolve the class/type dichotomy.
Among other benefits, this allows you to subclass types written in C.

Of course, there are other benefits, most notably descriptors, which make
properties, among other things, possible.

Jim

-- 
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to