homepage

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 ggenellina
Recipients benjamin.peterson, flashk, ggenellina
Date 2009年11月07日.06:14:42
SpamBayes Score 3.958585e-05
Marked as misclassified No
Message-id <1257574486.11.0.177216041451.issue7268@psf.upfronthosting.co.za>
In-reply-to
Content
The docs for the built-in function compile() say:
"Note: When compiling a string with multi-line statements, line endings 
must be represented by a single newline character ('\n'), and the input 
must be terminated by at least one newline character. If line endings 
are represented by '\r\n', use str.replace() to change them into '\n'."
http://www.python.org/doc/3.1/library/functions.html#compile
And the standard module py_compile ensures the source text ends with 
'\n' before calling the built-in compile function:
 if codestring and codestring[-1] != '\n':
 codestring = codestring + '\n'
I'd say the corresponding 2to3 fixer should do the same.
History
Date User Action Args
2009年11月07日 06:14:46ggenellinasetrecipients: + ggenellina, benjamin.peterson, flashk
2009年11月07日 06:14:46ggenellinasetmessageid: <1257574486.11.0.177216041451.issue7268@psf.upfronthosting.co.za>
2009年11月07日 06:14:44ggenellinalinkissue7268 messages
2009年11月07日 06:14:43ggenellinacreate

AltStyle によって変換されたページ (->オリジナル) /