Memory Error the right error for coding cookie promise violation?
Perhaps a more informative message would be nice. Here's an easy way to trigger it:
compile("#-*- coding: ascii -*-\nprint 'ab%c'\n"%0x80, '','exec') Traceback (most recent call last): File "<stdin>", line 1, in ? MemoryError
Regards, Bengt Richter
On Feb 21, 2006, at 6:53 AM, Bengt Richter wrote:
Perhaps a more informative message would be nice. Here's an easy way to trigger it:
compile("#-*- coding: ascii -*-\nprint 'ab%c'\n"%0x80, '','exec') Traceback (most recent call last): File "<stdin>", line 1, in ? MemoryError
Definitely looks like a bug, please open a bug report for it. Thanks, Alex
On 2/20/06, Bengt Richter <bokr@oz.net> wrote:
Perhaps a more informative message would be nice. Here's an easy way to trigger it:
compile("#-*- coding: ascii -*-\nprint 'ab%c'\n"%0x80, '','exec') Traceback (most recent call last): File "<stdin>", line 1, in ? MemoryError
This was fixed in 2.5, but looks like it wasn't backported. I don't recall exactly why. -- n Python 2.5a0 (trunk:42526M, Feb 20 2006, 16:00:48)
compile("#-*- coding: ascii -*-\nprint 'ab%c'\n"%0x80, '','exec') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "", line 0 SyntaxError: unknown encoding: ascii
participants (3)
-
Alex Martelli
-
bokr@oz.net
-
Neal Norwitz