On Friday 09 September 2011 17:59:38 Neal Becker wrote:
> I grabbed the latest mercurial pylint.
> 
> I have a class like:
> 
> class C:
>   def func (self, rcv_in, transmitter, n_uw, scaling=1.0)
> 
> later in that same module:
> 
> def func2 (an instance of class C...):
>     instance_of_class_C.func2 (cancelled, transmitter, n_uw=n_uw,
> xmit_freq=transmitter.freq, scaling=scaling)
> 
> The argument xmit_freq is extraneous and wrong.  pylint is silent.

Your use of func and func2 is confusing to me. Do you mean 
instance_of_classC.func(cancelled...) ? 

I think pylint has no way of guessing the type of the argument to func2, and 
therefore cannot make the link. 

given the following code:

class C:
    def f(self, aba, bibi, ccc):
        pass

def func(some_c):
    some_c.f(1, bibi=3, data=4)

my_c = C()
func(my_c)

my_c.f(1, bibi=3, data=4)

I get an Error flag on the last line, but not on the body of func. Not sure if 
we can get the type inference to work on that case. 

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, CubicWeb, Debian :  http://www.logilab.fr/formations
Développement logiciel sur mesure :      http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to