Support LOAD_METHOD and CALL_METHOD from Python 3.7+
Fixes #163
This commit is contained in:
BIN
tests/compiled/load_method.3.7.pyc
Normal file
BIN
tests/compiled/load_method.3.7.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/load_method.3.9.pyc
Normal file
BIN
tests/compiled/load_method.3.9.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/test_class_method_py3.3.7.pyc
Normal file
BIN
tests/compiled/test_class_method_py3.3.7.pyc
Normal file
Binary file not shown.
15
tests/input/load_method.py
Normal file
15
tests/input/load_method.py
Normal file
@@ -0,0 +1,15 @@
|
||||
class C:
|
||||
def test1(self):
|
||||
a = 1
|
||||
|
||||
def test2(self, x, y, z):
|
||||
a = x * y + z
|
||||
|
||||
# @staticmethod -- TODO: Fix decorators
|
||||
def testS():
|
||||
a = 3
|
||||
|
||||
c = C()
|
||||
c.test1()
|
||||
c.test2(42, 5, -1)
|
||||
C.testS()
|
19
tests/tokenized/load_method.txt
Normal file
19
tests/tokenized/load_method.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
class C : <EOL>
|
||||
<INDENT>
|
||||
def test1 ( self ) : <EOL>
|
||||
<INDENT>
|
||||
a = 1 <EOL>
|
||||
<OUTDENT>
|
||||
def test2 ( self , x , y , z ) : <EOL>
|
||||
<INDENT>
|
||||
a = x * y + z <EOL>
|
||||
<OUTDENT>
|
||||
def testS ( ) : <EOL>
|
||||
<INDENT>
|
||||
a = 3 <EOL>
|
||||
<OUTDENT>
|
||||
<OUTDENT>
|
||||
c = C ( ) <EOL>
|
||||
c . test1 ( ) <EOL>
|
||||
c . test2 ( 42 , 5 , - 1 ) <EOL>
|
||||
C . testS ( ) <EOL>
|
BIN
tests/xfail/loadbuild_class.3.7.pyc
Normal file
BIN
tests/xfail/loadbuild_class.3.7.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user