[code-quality] [Python-projects] New warning about print parens not a good idea?
Marc 'BlackJack' Rintsch
marc at rintsch.de
Fri Feb 7 22:07:15 CET 2014
On 07/02/14 20:15, Sasha Hart wrote:
> If there are many people who actually want to enforce the non-use of
> print(arg) in 2.x for some specific reason, and not just because it is
> bad style to write if (a == b) or foobar((2)) - then I would strongly
> prefer for an error code to disable this check independently of the
> other useful warnings, as Carl Crowder suggested.
I think ``print(something)`` is even worse than ``if (a == b):`` because
it is misleading if ``print`` is a statement. It lets people think it's
okay to also write ``print(something, another_thing)`` which has a very
different meaning and output depending on ``print`` being a statement or
a function.
Are there really that many people out there trying to write single
source code for 2.5 and 3.x? That's quite some range.
A separate error code would be good, because IMHO it is a different kind
of ”error”.
Ciao,
Marc 'BlackJack' Rintsch
--
“Web 2.0 is not about bringing people together or creating
communities or making the world a better place. It's about
making huge profits out of peer pressure.” -- scytale.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/code-quality/attachments/20140207/36c946f1/attachment.sig>
More information about the code-quality
mailing list