Adding print-style function calls, and preproc plugins

Alex Martelli aleax at aleax.it
Fri Aug 31 07:38:36 EDT 2001


"Bengt Richter" <bokr at accessone.com> wrote in message
news:3b8ebfe4.21582754 at wa.news.verio.net...
    ...
> BTW, it might be interesting if symbols existed as objects that
> could be returned by a function on the left hand side of '='
> so that
>     def foo()
>         return symbol('xxx')
>     ...
>     foo() = 'yyy'
> would result in
>     >>> xxx
>     'yyy'
> and foo would remain bound to the function.

That's "interesting" as in the proverbial Chinese curse "may
you live in interesting times", yes?  Such an injections of
"new local variables" which the compiler cannot predict at
compile-time is just as bad as that done by the exec statement
or "from bleargh import *" -- it has even less justification
than those two historical warts, too.

Even in Perl, "soft references" (via variable names) as
introduced in Perl 5 are widely considered too dirty for
words (and they're disabled by use strict, etc etc) -- the
last thing I'd want to see happen to Python would be a
degeneration towards such extra wartiness.


Alex






More information about the Python-list mailing list