strict python?
Fernando PĂ©rez
fperez528 at yahoo.com
Wed Dec 5 20:19:54 EST 2001
Erik Max Francis wrote:
> Hans Nowak wrote:
>
>> Well, 'self.func' is a perfectly valid Python expression,
>> just like '3'. Not very useful when used like this, but
>> still, perfectly valid.
>
> Seems like now there are warning facilities built into the language
> it might be useful to have warnings emitted in situations like this
> (a statement with no side effects) -- things that are truly not
> error but are genuinely not useful either.
>
> Or is the general approach of the core Python team to relegate that
> to third-party developers (such as PyChecker)?
>
At the risk of incurring the wrath of the religious language police,
one of the few things I miss from perl in python is the -w switch: it
puts perl in a somewhat paranoid mode where it gives you warnings
about all sorts of legal but subtle or potentially dangerous
situations. You can ignore them or not use it, but it often opens
your eyes to something you didn't even realize you were doing. It can
be quite a time saver (it's a bit like gcc's -Wall switch).
I honestly don't see any reason for something like that not to be
included in python (other than perhaps 'if perl has it it can't be
good' :)
Cheers,
f
More information about the Python-list
mailing list