Python 3.x ifelse in comprehension

Fixes Issue #91
This commit is contained in:
rocky
2017-04-16 14:47:11 -04:00
parent 87e005a7ba
commit 3a8d4e1a12
4 changed files with 20 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,7 @@
# From https://github.com/ToontownInfinite /src/otp/avatar/LocalAvatar.py#L364
if 1:
def jumpLandAnimFix(self, jumpTime):
return 5
def jumpLand(self):
return 6

View File

@@ -0,0 +1,12 @@
# Python 2.7 sqlalchemy-1.013/sql/crud.py
def _extend_values_for_multiparams(compiler, stmt, c):
c(
[
(
(compiler() if compiler()
else compiler())
if c in stmt else compiler(),
)
]
for i in enumerate(stmt)
)

View File

@@ -407,6 +407,7 @@ class Python3Parser(PythonParser):
def p_expr3(self, args):
"""
conditional ::= expr jmp_false expr jf_else expr COME_FROM
conditional ::= expr jmp_false expr ja_else expr
conditionalnot ::= expr jmp_true expr jf_else expr COME_FROM
expr ::= LOAD_CLASSNAME