redirect to > and to console ?
Alex Martelli
aleax at aleax.it
Fri Jul 26 06:10:00 EDT 2002
Gerhard Haering wrote:
...
> print>> sys.stderr, "foobar"
>
> will work fine. I'd use the print>> form, because it has the advantage
> that it annoys the Martellibot, among others ;-)
If you were _really_ keen on annoying me, you'd be using
print>> sys.stderr, (lambda x, y: x+y)("foo", "bar")
or other deeper-yet obfuscations. "print>>" on its own is small
potatoes -- gotta add a useless lambda or two and perhaps a list
comprehension abuse to really start me fuming.
Alex
More information about the Python-list
mailing list