gratuitous new features in 2.0

Grant Edwards ge at nowhere.none
Fri Aug 25 10:26:37 EDT 2000


In article <8o5mkq$dcv$1 at icarus.knowledgegroup.co.uk>, Pat Knight wrote:

>I've just looked at PEP 214. I think the justification for this
>enhancement is very weak. It doesn't give us any functionality
>we can't achieve already with the write method of file objects
>and string interpolation.

Exactly. I think that is strongest argument: there's already a
way to do what is proposed by using <file-object>.write().

>Can anyone explain why we need even a function-call style of
>implementation of this feature, let alone a change to print.

Personally, I don't understand why "print" exists at all.  You
can accomplish the same thing with sys.stdout.write().  I think
"print" does way to many automagical things behind the back of
the programmer:

 1) converts objects to strings
 
 2) implicitly writes to a global object
    (I've always been warned about such side-effects)
    
 3) writes a newline

But, I'm sure it's too late to get rid of the print statement.

-- 
Grant Edwards                   grante             Yow!  Today, THREE WINOS
                                  at               from DETROIT sold me a
                               visi.com            framed photo of TAB HUNTER
                                                   before his MAKEOVER!



More information about the Python-list mailing list