[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread STINNER Victor
STINNER Victor added the comment: The attached patch attempts to clarify this by providing a different error when the start character is invalid. I dislike the patch. The error message invalid character in identifier is correct. I don't want to modify so much code for a little better error

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread Matt Bachmann
Matt Bachmann added the comment: Alrighty. I'll investigate and see if I can cut down the code some. If I can't significantly I'll let the issue die quietly. I agree that it's a pretty nitpick ticket. I noticed it while doing some research into unicode and made the patch when I saw how

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agreed with Ezio. Adding 7 new public names just to enhance one rare error message looks too hight cost. I am inclined to left all as is. Original message is not so bad. -- ___ Python tracker

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread Ezio Melotti
Ezio Melotti added the comment: While the request is reasonable, the patch seems to touch quite some code. Since this is just to improve an error message in a somewhat obscure corner case, I'm not sure it's worth applying it. -- nosy: +serhiy.storchaka stage: - patch review versions:

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-01-17 Thread Matt Bachmann
New submission from Matt Bachmann: PEP 3131 changed the definition of valid identifiers to match this pattern XID_Start XID_Continue* . Currently if you have an invalid character in an identifier you get this error ☺ = 4 SyntaxError: invalid character in identifier This is fine in most