gratuitous new features in 2.0

Martijn Faassen m.faassen at vet.uu.nl
Fri Aug 25 18:51:44 EDT 2000


Following up to myself:

Martijn Faassen <m.faassen at vet.uu.nl> wrote:
[snip]
> So, while I don't mind the print statement, is there something else that
> makes print special that we're overlooking? Otherwise it would seem to be
> smarter just to introduce this system of functions instead. Eventually we
> could then even deprecate the statement; Python seems to be dynamic enough
> to be able to do without, without losing the flexibility.

I've been reading through the python-dev archives, and Guido's reason for
wanting the >> seems to be that he can easily output something to
stderr (for instance), without having to switch from print to 

import sys

sys.stderr.write()

This could be solved in a cleaner way (in my opinion), by simply putting
stdout and stderr (and presumably stdin) in the default namespace, and
adding a print() and println() method to the standard file object 
(and provide a mixin for people to use with their own file-like objects,
providing these two methods).

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list