blob: 7a60e533a15d9456a209b36abeaffcd39ab6a268 [file] [log] [blame]
Tor Norbye1aa2e092014-08-20 17:01:23 -07001class MyClass(object):
2 def method(self):
3 pass
4
5 @staticmethod
6 def static_method():
7 pass
8
9
10# Unbound method still treated as __method in Python 2
11MyClass.method.__func__
12MyClass.method.<warning descr="Cannot find reference '__defaults__' in 'function'">__defaults__</warning>
13
14# Bound method with qualifier
15inst = MyClass()
16inst.method.__func__
17inst.method.<warning descr="Cannot find reference '__defaults__' in 'function'">__defaults__</warning>
18
19# Reassigned bound method without qualifier
20m = inst.method
21
22# Static method
23# This reference should be marked as unresolved, but such warnings are suppressed for methods with decorators
24inst.static_method.__func__
25inst.static_method.__defaults__