Comment 2 for bug 1675659

Revision history for this message
Lele Gaifax (lelegaifax) wrote :

Well, I don't agree with your argument, but if that's instead valid, then I would
expect that a very similar case, that is

def a():
    pass

class A:
    def a(self):
        pass

should emit the same error instead of the current happy mood, and even

a = 1

def b():
    a = 2

should "warn" me about the override of a global symbol within the function namespace,
instead of the current and IMHO correct warning about unused assignment.

In any case, the fact that the error "disappear" as soon as I use the imported symbol
seems wrong: the class method is still overriding the global symbol.