Files
python-uncompyle6/test/simple_source/bug27+/02_ifelsetmtl.py
2018-01-22 23:08:20 -05:00

12 lines
331 B
Python

# Issue #148 on 2.7
# Bug is in handling CONTINUE like JUMP_BACK
# Similar code is probably found in a 2.7 stdlib. mapurl?
def reduce_url(url):
atoms = []
for atom in url:
if atom == '.':
pass # JUMP_BACK is patched as CONTINUE here
elif atom == '..':
atoms.push()
return atoms