[Python-Dev] Replacement for print in Python 3.0
Fredrik Lundh
fredrik at pythonware.com
Mon Sep 5 12:14:52 CEST 2005
More information about the Python-Dev mailing list
Mon Sep 5 12:14:52 CEST 2005
- Previous message: [Python-Dev] Mixin classes in the standard library
- Next message: [Python-Dev] Simplify the file-like-object interface (Replacement for print in Python 3.0)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven Bethard wrote:
>
>> > Use the print() method of sys.stderr:
>> >
>> > sys.stderr.print('error or help message')
>>
>> so who's going to add print methods to all file-like objects?
>
> The same people that added __iter__(), next(), readline(), readlines()
> and writelines() to their file-like objects
who did that?
(you completely missed the point -- today's print mechanism works on *any* object
that implements a "write" method, no just file objects. saying that "oh, all you need is
to add a method" or "here's a nice mixin" doesn't give you a print replacement)
</F>
- Previous message: [Python-Dev] Mixin classes in the standard library
- Next message: [Python-Dev] Simplify the file-like-object interface (Replacement for print in Python 3.0)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list