pylint-bot / test

0 stars 0 forks source link

There's no unbound method on Python 3 #131

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)


Given the following code, A.test will be inferred as an UnboundMethod, which is wrong, because there's no unbound method on Python 3. We should probably return a function instead.

#!python

from astroid.test_utils import extract_node
n = extract_node('''
class A:
    def test(self): pass
A.test #@
''')
inferred = next(n.infer())
print(inferred)