print is not a function
Alex Martelli
aleax at aleax.it
Wed Oct 8 06:44:33 EDT 2003
Karl Scalet wrote:
...
>>>>>sys.stdout.write("Hello world!\n")
>
> I came across this, but this requires an extra import sys
> which not always is there, thanks anyhow.
Ah, hadn't seen this before I answered your other post.
Well. duplicating the print statement functionality in
a *built-in* function to let you abuse a list comprehemsion
for the side effects and throw away the results just ain't
gonna happen. Built-in functions are (or should be: there
may well be purges in Python 3.0) just for tasks so important
and widespread that an 'import' cannot be considered.
Alex
More information about the Python-list
mailing list