Python Style Question

Greg Ewing (using news.cis.dfn.de) g2h5dqi002 at sneakemail.com
Mon May 19 21:09:09 EDT 2003


Greg Fortune wrote:
> Looks like the coder expected a performance improvement.  If it gets 
> executed the way I expect, the second example requires a lookup through the 
> dialog module each time the class is instantiated.

It's certainly *not* executed that way. The base class
expression is only evaluated once, when the class is
defined.

Are the XXX_Parent things used anywhere else? Maybe
they're being used for inherited method calls, and the
author wanted to insulate such calls from changes to
the base class in future versions.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list