I strongly dislike Python 3

Thomas Jollans thomas at jollans.com
Sun Jun 27 08:16:39 EDT 2010


On 06/27/2010 01:46 PM, rantingrick wrote:
> 
>>> P.S. Am I the only one who has never, ever, even *seen* a 'print'
>>> statement in non-toy or non-bash-script-style code in any application
>>> or even third-party library I looked at? Except, on occasion, for
>>> quick and dirty debugging. Perhaps because I'm more used to
>>> cross-platform to windows development, where a stray print can
>>> actually break the entire application (depending on contexts, if one
>>> is run under a service or sometimes even pythonw)
> 
> Oh i dunno, these "toys" include print...

Do your homework properly. I randomly checked a few of these. base64
includes a "Small main program", which is certainly "bash-script-style".
Quite a few of the other files don't use print-the-statement/function at
all, but use "print" as part of an identifier. Your grepping is sloppy,
my friend!

Granted, some use print to emit warnings (aifc for example). This isn't
perfectly clean, of course, but it's not used a whole lot either. Mostly
rather old code too, I think.
And some (abc for example) use print in what looks like internal
diagnostics methods.

That being said, Stephen's statement was very broad, but I think it's
true: print is primarily used in small scripts, or script-like testing
functions/methods.

Thomas

> 
> C:\Python26\Lib\abc.py
> C:\Python26\Lib\aifc.py
>  [ ... ]



More information about the Python-list mailing list