[Python-3000] Invalid \U escape in source code give hard-to-trace error

2007-07-15 Thread Guido van Rossum
When a source file contains a string literal with an out-of-range \U escape (e.g. "\U12345678"), instead of a syntax error pointing to the offending literal, I get this, without any indication of the file or line: UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-9: illega

[Python-3000] exclusion feature for 2to3?

2007-07-15 Thread Georg Brandl
In order to have a codebase run in 2.x and 3.x, via automated translated by 2to3, there should be some "exclusion feature" for single lines that tells the refactorer not to touch those lines. For example, if you have some object that still has an iteritems() method and keeps it, it'll have to stay

Re: [Python-3000] exclusion feature for 2to3?

2007-07-15 Thread James Thiele
It makes sense - what would you suggest to specify lines/features to exclude? On 7/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > In order to have a codebase run in 2.x and 3.x, via automated translated by > 2to3, there should be some "exclusion feature" for single lines that tells > the refact

Re: [Python-3000] exclusion feature for 2to3?

2007-07-15 Thread Guido van Rossum
On 7/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > In order to have a codebase run in 2.x and 3.x, via automated translated by > 2to3, there should be some "exclusion feature" for single lines that tells > the refactorer not to touch those lines. > > For example, if you have some object that sti

Re: [Python-3000] Invalid \U escape in source code give hard-to-trace error

2007-07-15 Thread Neal Norwitz
On 7/15/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > When a source file contains a string literal with an out-of-range \U > escape (e.g. "\U12345678"), instead of a syntax error pointing to the > offending literal, I get this, without any indication of the file or > line: > > UnicodeDecodeErro