Bidirectional communication through pipes: read/write popen()

Fredrik Lundh fredrik at pythonware.com
Sun Oct 17 08:53:02 EDT 1999


> > (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?

yes, there are tons of code that relies on the
fact that the default values are evaluated once,
and more importantly, that they are evaluated
in the namespace where the function/lambda
is defined.

in fact, it's currently the only reasonable way
to pass local variables into a nested namespace
(like when using lambdas).  it's also often used
to speed things up, by binding commonly used
globals to local names.

...

but sure, I'm sure Guido is open for proposals. I
don't think you can get away with "always evaluate
them on each call," though...

</F>

<!-- coming monday:
http://www.pythonware.com/people/fredrik/librarybook.htm
(the eff-bot guide to) the standard python library. -->





More information about the Python-list mailing list