Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

while1 with pop block #2

Open
rocky opened this issue Mar 5, 2018 · 0 comments
Open

while1 with pop block #2

rocky opened this issue Mar 5, 2018 · 0 comments

Comments

@rocky
Copy link

rocky commented Mar 5, 2018

# From 3.4.4 mailcap.py
# Bug was needing a grammar rule to add POP_BLOCK before the end of the while1.
# 3.3 apparently doesn't add this.
def readmailcapfile(line):
    while 1:
        if not line: break
        if line[0] == '#' or line.strip() == '':
            continue
        if not line:
            continue
        for j in range(3):
            line[j] = line[j].strip()
        if '/' in line:
            line['/'].append('a')
        else:
            line['/'] = 'a'
    return
Traceback (most recent call last):
  File "./unpyc3.py", line 2023, in <module>
    print(decompile(sys.argv[1]))
  File "./unpyc3.py", line 1197, in __str__
    self.display(istr)
  File "./unpyc3.py", line 1203, in display
    stmt.display(indent)
  File "./unpyc3.py", line 1046, in display
    self.display_undecorated(indent)
  File "./unpyc3.py", line 1070, in display_undecorated
    self.code.get_suite().display(indent + 1)
  File "./unpyc3.py", line 304, in get_suite
    dec.run()
  File "./unpyc3.py", line 1264, in run
    new_addr = method(addr, arg)
  File "./unpyc3.py", line 1330, in SETUP_LOOP
    d_body.run()
  File "./unpyc3.py", line 1262, in run
    new_addr = method(addr)
  File "./unpyc3.py", line 1579, in STORE_SUBSCR
    self.store(PySubscript(expr, sub))
  File "./unpyc3.py", line 1287, in store
    val.store(self, dest)
AttributeError: 'WhileStatement' object has no attribute 'store'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant