Matthew Wilson schrieb:
> I sometimes inadvertently create a new attribute on an object rather
> update a value bound to an existing attribute.  For example:
> 
>     In [5]: class some_class(object):
>        ...:      def __init__(self, a=None):
>        ...:          self.a = a
>        ...:
> 
>     In [6]: c = some_class(a=1)
> 
>     In [7]: c.a
>     Out[7]: 1
> 
>     In [8]: c.A = 2
> 
> I meant to update c.a but I created a new c.A.  I make this mistake
> probably hourly.

Try pylint & pychecker.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to