a wierd parameter passing behavior
Gerrit Holl
gerrit at nl.linux.org
Wed Jun 4 14:39:25 EDT 2003
Gerrit Holl schreef op woensdag 4 juni om 15:46:38 +0000:
> Torvo Sollazzo schreef op woensdag 4 juni om 15:31:51 +0000:
> > Why p1() is different from p()?
>
> p1 does not change l, p does. p1 creates a new l in it's own local
> namespace, while p updates l: += equals .append(). This is documented
> in the language reference:
Correction: .append() should be .extend().
yours,
Gerrit.
--
19. If he hold the slaves in his house, and they are caught there, he
shall be put to death.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list