On Mon, Nov 23, 2009 at 11:36 PM, Marc 'BlackJack' Rintsch
<m...@rintsch.de> wrote:
> But it is no error.  It is perfectly legal to implement `__pos__()` in a
> way that makes sense to call it repeatedly.  Even to implement that two
> successive calls increment something to mimic some C++ behaviour.  Butt
> ugly, but legal.

It's trivial to come up with examples that pylint flags as an error
and that, technically, are valid Python. Off the top of my head:

class A:
 pass

a = A()
a.__dict__["foo"] = 123
print(a.foo)

I think it's a good thing pylint complains loudly about this sort of thing.
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to