[Python-ideas] Add 'use warnings' directive, like in Perl

Andrew Barnert abarnert at yahoo.com
Tue Feb 10 23:09:11 CET 2015


Eduard, if you're going to suggest changes to Python, you really ought to first learn the current version, 3.4, and use it in your examples, rather than 2.7. (And use PEP8 style, too.)

In simple cases like this, it doesn't make any real difference, and people can understand what you're suggesting--but it may still make people subconsciously less receptive (as in, "if he's not even willing to keep up with Python and see what we've improved in the last decade, what are the chances he'll have any good insight that's worth paying attention to that we haven't already thought of?").

Also, you keep comparing Python to, along with perl, C++. But in C++, many people _do_ use linters and static analyzers. Whether things like the cpplint, clang SA, the Xcode/Visual Studio/Eclipse/etc. IDE features, etc. count as "third party" is kind of a tricky question (for many developers, "comes with VS" or "comes with Xcode" probably means "not third party"), but I don't think it's really an important question; they're features that aren't part of the language, or of every implementation, that many people rely on--just like pylint, flakes8, the PyCharm IDE features, etc. in Python. They can catch things that are usually but not always wrong, or legal but stylistically bad, or illegal but a conforming compiler isn't allowed to issue an error, or expensive to check for, etc.

On Feb 10, 2015, at 12:27, Ian Cordasco <graffatcolmingov at gmail.com> wrote:

> On Tue, Feb 10, 2015 at 1:53 PM, Eduard Bondarenko <eduardbpy at gmail.com> wrote:
>> Well, Perl also dynamic language, but except the usage of the additional
>> analyser tools he provides 'use warning' directive and many Perl's
>> developers use this feature.
> 
> First of all, Python is not a "he". Python is an "it".

I don't know; as the mother of other languages like Boo, maybe Python as is "she". Like the mighty Crimson Permanent Assurance, she sails, striking terror into the hearts of all those born from the C, especially off the coast of Java.


More information about the Python-ideas mailing list