gratuitous new features in 2.0

Warren Postma embed at NOSPAM.geocities.com
Fri Aug 25 14:25:34 EDT 2000


"Rainer Deyke" <root at rainerdeyke.com> wrote in message
news:p%wp5.99116$6y5.68070091 at news2.rdc2.tx.home.com...
> "Grant Edwards" <ge at nowhere.none> wrote in message
> news:xmvp5.7634$6E.1862862 at ptah.visi.com...
> > 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.
>
> I agree.  print should be deprecated, not extended.
>

Bah.

Print is useful for two things:
        1. debugging
        2. demonstrating python interactively.

It is an obvious "wave of the cap" to the interactive fashion in which many
of us 1970's era Microcomputer BASIC programming types cut their teeth on
programming.   Sure it's not OOP'y, but the lack of "slavish adherence" to
OOP is one of Python's strong points, not a weak point. ;-)

Warren






More information about the Python-list mailing list