Menu

#292 epydoc introspection fails on unified try/except/finally

open-rejected
nobody
None
5
2008-09-09
2008-09-08
No

Epydoc 3.0.1 fails to load this code snippet:

try:
print
except RuntimeError, e:
print(str(e))
finally:
print('Finally')

| Error: Import failed:
| SyntaxError: invalid syntax (test.py, line 5)

However, it succeeds on any of the following:

try:
print
finally:
print('Finally')

-- OR --

try:
print
except RuntimeError, e:
print(str(e))

Discussion

  • Pierre Bourgault

    This is not a bug finally. On Linux, I have 2 versions of python. I was using epydoc from the command-line and was picking the older one (2.4.3), thanks to the #!/usr/bin/python at the beginning of the epydoc script. So instead, I called epydoc this way, "python epydoc --config config test", and it worked since my PATH variable is set to pick up the newer version of python (2.5.1).

    So, sorry about the noise.

     
  • Pierre Bourgault

    • status: open --> open-rejected
     

Log in to post a comment.