[code-quality] Variable declarations + pyflakes

Marc 'BlackJack' Rintsch marc at rintsch.de
Mon May 27 22:19:02 CEST 2013


On 27/05/13 21:40, François Pinard wrote:> Raphael Clifford
<drraph at gmail.com> writes:
>
>> Is it possible for use pyflakes with some suitably defined annotation
>> to do something equivalent?  Getting python devs to accept the
>> suggestion for the core python language more not be at all plausible.
>
> Well, it might be interesting if pyflakes or some similar tool was able
> to make sense out of a few:
>
>    assert isinstance(argument-identifier, some-class)

But then code fails with valid values that are not instances of
some-class.  Duck typing would not work anymore.

It's like static typing but with more typing.

Ciao,
	Marc 'BlackJack' Rintsch
-- 
“A man should never be ashamed to own he has been in the wrong,
 which is saying, in other words, that he is wiser today
 than he was yesterday.”  -- Jonathan Swift


More information about the code-quality mailing list