Latest pydoc on Void linux 64 bit, I have no idea how to capture the version. Source file can be either Python 3.4 or 2.7, same result. ERROR MESSAGE: [slitt@mydesk ~]$ pydoc pydoc_fail problem in ./pydoc_fail.py - <type 'exceptions.SyntaxError'>: invalid syntax (pydoc_fail.py, line 6) [slitt@mydesk ~]$
Are you sure you are running pydoc using python3? That error looks like you are running it using python2, as does the command line you show (since on most systems the pydoc command comes from python2). (I don't know what you mean by "source file can be..."; nonlocal is python3 only.)
On Sat, 02 Jan 2016 02:23:27 +0000 "R. David Murray" <report@bugs.python.org> wrote: > R. David Murray added the comment: > > Are you sure you are running pydoc using python3? That error looks > like you are running it using python2, as does the command line you > show (since on most systems the pydoc command comes from python2). > (I don't know what you mean by "source file can be..."; nonlocal is > python3 only.) > > ---------- > nosy: +r.david.murray Thanks R. David, You indeed got to the crux of the problem. I performed the following command and everything worked perfectly: python3 /usr/bin/pydoc pydoc_fail.py I tried to note on the bug tracker that the problem is solved by using Python3 to run pydoc and this wasn't a bug, but was unable to add anything to issue 25990. I saw no "reply" button, and "Edit" was a label, not a button. How do I reply on the bug tracker? Thanks, Steve Steve Litt November 2015 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques