A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/058688.html below:

[Python-Dev] On moving to new-style classes

[Python-Dev] On moving to new-style classes [Python-Dev] On moving to new-style classesskip@pobox.com skip at pobox.com
Tue Dec 13 16:39:32 CET 2005
    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?  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__.

    Jim> Having to write accessors for all your public methods doesn't seem
    Jim> consistent with rapid development.  

I'd rather trade the 30 seconds it takes to write a simple accessor method
when I need it than the minute or two it takes to figure out where my
attribute got stomped.

I guess it mostly boils down to a matter of taste.  Did I also mention that
most of the programmers here are C++ folk?  They have their beloved inline
keyword.  <wink>

Skip
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4