FAQ

On Sun, 17 Oct 1999, Fredrik Lundh wrote:
Oleg Broytmann wrote:
On 17 Oct 1999, Hrvoje Niksic wrote:
def rwpopen(input, command, args=[]):
^^^^^^^
There was well-know problem with passing mutable object as a default.
Not sure if it was fixed in recent versions of Python...
well, that's only a problem if you modify the object
inside the function...
Sooner or later you forget about it and modify args and what? :) No, I
better will avoid this completely until Python fixes it.
(and no, it hasn't been fixed. I doubt it can be
fixed without breaking stuff).
Mmm??? Are there a line of code that *relies* on that misfeature?

Oleg.
----
Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/
Programmers don't die, they just GOSUB without RETURN.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 12 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedOct 17, '99 at 12:47a
activeOct 27, '99 at 7:30p
posts12
users6
websitepython.org

People

Translate

site design / logo © 2021 Grokbase