mutable default arguments

Duncan Booth duncan at NOSPAMrcp.co.uk
Thu Feb 27 07:15:04 EST 2003


Arnaud Delobelle <delobelle at blueyonder.co.uk> wrote in 
news:87wujmx7ln.fsf at blueyonder.co.uk:

> So my question is: what's the rationale behind it?  I've spent so much
> time working out what the problem was that I have no brainpower left,
> sorry.

See the FAQ, entry 6.25
http://www.python.org/cgi-bin/faqw.py?req=show&file=faq06.025.htp


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list