Bidirectional communication through pipes: read/write popen()
Oleg Broytmann
phd at sun.med.ru
Sun Oct 17 08:36:24 EDT 1999
On Sun, 17 Oct 1999, Fredrik Lundh wrote:
> Oleg Broytmann <phd at sun.med.ru> 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.
More information about the Python-list
mailing list