Default parameters

Greg Ewing (using news.cis.dfn.de) g2h5dqi002 at sneakemail.com
Thu Dec 18 23:03:05 EST 2003


Paul Rubin wrote:
> In those cases the compiler should notice it and generate appropriate
> code to evaluate the default arg just once.

How is the compiler supposed to know? In the general case
it requires reading the programmer's mind.

-- 
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