mutable default parameter problem [Prothon]
mark at prothon.org
Mon Jun 28 19:46:58 CEST 2004
"Antoon Pardon" <apardon at forel.vub.ac.be> wrote
> Well personnally I would solve this with a more general loop construct.
> Something like: (Pseudo code)
> while len(list) < 10:
> blah blah.
> The more general construct would be something like:
> while condition1:
> exit code if condition1 fails
> while condition2:
> exit code if condion2 fail
This seems non-intuitive to me. Also how would you know the "while" was not
a regular "while"? Even if the parser could figure it out, the reader would
BTW: Your code example has the "while" indentation not aligning with
anything above which is illegal indentation.
More information about the Python-list