Benjamin Peterson <benja...@python.org> added the comment:

2011/7/16 Nick Coghlan <rep...@bugs.python.org>:
>
> Nick Coghlan <ncogh...@gmail.com> added the comment:
>
> It matters, because Python "users" are programmers, and most
> programmers want to know *why* they're being told something is wrong.
> Raising MemoryError is technically incorrect at this point, but at
> least gives the right flavour of the user not doing anything
> specifically wrong, the program just ran out of resources trying to do
> as they asked. I see SyntaxError as significantly worse, however, as
> instead of telling the developer "sorry, that's a reasonable request,
> but I can't handle it", the interpreter is now telling them "you did
> that wrong, change it". The semantics of that are all wrong. There's
> nothing wrong with the syntax of the user's code, it's just that the
> compiler can't handle it.

I content that in normal code, it is so extremely rare as to be
unheard of, to get exceptions about the parser stack overflowing or
segfault the compiler by too deep nesting. People who are doing this
(generally to prove the point about limitations of the compiler) are
smart enough to know exactly what "parser stack overflowed" means and
separate that from Python as the language. Adding a new exception is
solving a non-existent problem.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to