3.4 if/while bug

This commit is contained in:
rocky
2016-05-15 05:37:44 -04:00
parent e79cecbb71
commit 4cba5a28ef
3 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
# From genericpath
# Problem on Python 3.4
# end of if can come from both finishing loop
# and not taking the if.
# whilestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK \e__come_from
# _ifstmts_jump ::= c_stmts_opt JUMP_FORWARD \e__come_from
# ifstmt ::= testexpr _ifstmts_jump
# _come_from ::= _come_from COME_FROM
# _ifstmts_jump ::= c_stmts_opt JUMP_FORWARD _come_from
def splitext(p, sep, altsep, extsep):
if altsep > extsep:
while sep < altsep:
sep += 1
return p