__class__ cell is defined for methods in py3
Bug #1658411 reported by
Antony Lee
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
New
|
Undecided
|
Unassigned |
Bug Description
On Py3,
class C:
def ownclass(self):
return __class__
print(C(
executes correctly (`__class__` is the class in which the method was defined, which is not necessarily the type of `self`, see https:/
/tmp/foo.py:3: undefined name '__class__'