You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
3.6 Chained compare
This commit is contained in:
Binary file not shown.
BIN
test/bytecode_2.6_run/01_triple_compare.pyc
Normal file
BIN
test/bytecode_2.6_run/01_triple_compare.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.7_run/01_triple_compare.pyc
Normal file
BIN
test/bytecode_2.7_run/01_triple_compare.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_3.2_run/01_triple_compare.pyc
Normal file
BIN
test/bytecode_3.2_run/01_triple_compare.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_3.3_run/01_triple_compare.pyc
Normal file
BIN
test/bytecode_3.3_run/01_triple_compare.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.6_run/01_triple_compare.pyc
Normal file
BIN
test/bytecode_3.6_run/01_triple_compare.pyc
Normal file
Binary file not shown.
@@ -1,8 +1,11 @@
|
|||||||
# In Python 3.3+ this uses grammar rule
|
# In Python 3.3+ this uses grammar rule
|
||||||
# compare_chained2 ::= expr COMPARE_OP RETURN_VALUE
|
# compare_chained2 ::= expr COMPARE_OP RETURN_VALUE
|
||||||
|
# In Python 3.6 uses this uses grammar rule
|
||||||
|
# compare_chained2 ::= expr COMPARE_OP come_froms JUMP_FORWARD
|
||||||
|
|
||||||
# Seen in Python 3.3 ipaddress.py
|
# Seen in Python 3.3 ipaddress.py
|
||||||
|
|
||||||
|
# RUNNABLE!
|
||||||
def _is_valid_netmask(netmask):
|
def _is_valid_netmask(netmask):
|
||||||
return 0 <= netmask <= 10
|
return 0 <= netmask <= 10
|
||||||
|
|
||||||
@@ -10,4 +13,4 @@ def _is_valid_netmask(netmask):
|
|||||||
# detections
|
# detections
|
||||||
|
|
||||||
# See in 2.6.9 quopri.py ishex():
|
# See in 2.6.9 quopri.py ishex():
|
||||||
'0' <= __file__ <= '9' or 'a' <= __file__ <= 'f' or 'A' <= __file__ <= 'F'
|
assert not '0' <= __file__ <= '9' or 'a' <= __file__ <= 'f' or 'A' <= __file__ <= 'F'
|
||||||
|
@@ -133,6 +133,8 @@ class Python36Parser(Python35Parser):
|
|||||||
stmt ::= tryfinally_return_stmt
|
stmt ::= tryfinally_return_stmt
|
||||||
tryfinally_return_stmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK LOAD_CONST
|
tryfinally_return_stmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK LOAD_CONST
|
||||||
COME_FROM_FINALLY
|
COME_FROM_FINALLY
|
||||||
|
|
||||||
|
compare_chained2 ::= expr COMPARE_OP come_froms JUMP_FORWARD
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def customize_grammar_rules(self, tokens, customize):
|
def customize_grammar_rules(self, tokens, customize):
|
||||||
|
Reference in New Issue
Block a user