Message140496
2011/7/16 Nick Coghlan <report@bugs.python.org>:
>
> Nick Coghlan <ncoghlan@gmail.com> added the comment:
>
> +1 for a new exception type to indicate "this may technically be legal Python, but this Python implementation cannot handle it correctly"
>
> Whatever exception type we add, it would be nice to also be able to use it if someone eventually fixes the compiler recursion crasher, so I'd like to paint this particular bikeshed as the more general "SyntaxLimitError".
What is the point of a new exception? When would you ever want to
catch it as opposed to a regular SyntaxError? You're going to have to
change the code either way.
Moreover, all Python implementations are going to have to place some
limits on stack depth and recursion, so it's not really an
implementation detail.
The Python language doesn't make an mention of limited memory, but no
one is going to suggest a MemoryLimitError, which is an
"implementation detail". |
|
Date |
User |
Action |
Args |
2011-07-16 14:43:35 | benjamin.peterson | set | recipients:
+ benjamin.peterson, loewis, georg.brandl, terry.reedy, ncoghlan, marienz, pitrou, Trundle, eric.snow |
2011-07-16 14:43:34 | benjamin.peterson | link | issue11343 messages |
2011-07-16 14:43:34 | benjamin.peterson | create | |
|