This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meador.inge
Recipients docs@python, georg.brandl, meador.inge
Date 2011-09-23.03:55:21
SpamBayes Score 5.5199744e-06
Marked as misclassified No
Message-id <1316750126.45.0.500259482176.issue12943@psf.upfronthosting.co.za>
In-reply-to
Content
> I don't think the help option needs to be documented, it will document 
> itself.

Normally I would document it anyway, but in this case there is only the
one option.  So, I dropped it.

> An additional suggestion is to catch errors on tokenizing and exiting 
> with a non-zero exit status in these cases.

I like that idea.  Sample output:

$ python -m tokenize foo.py
foo.py: error: unknown encoding: meador
$ python -m tokenize foo.py
foo.py:7:2: error: unindent does not match any outer indentation level
$ ./python -m tokenize bogus.py
error: [Errno 2] No such file or directory: 'bogus.py'
$ python -m tokenize foo.py
$ echo '[1,' | ./python -m tokenize
1,0-1,1:            OP             '['            
1,1-1,2:            NUMBER         '1'            
1,2-1,3:            OP             ','            
1,3-1,4:            NL             '\n'           
<stdin>:2:0: error: EOF in multi-line statement

Attached is the latest patch implementing these suggestions.
History
Date User Action Args
2011-09-23 03:55:27meador.ingesetrecipients: + meador.inge, georg.brandl, docs@python
2011-09-23 03:55:26meador.ingesetmessageid: <1316750126.45.0.500259482176.issue12943@psf.upfronthosting.co.za>
2011-09-23 03:55:25meador.ingelinkissue12943 messages
2011-09-23 03:55:25meador.ingecreate