[issue6709] It's possible to create TryExcept with no handlers

2012-11-09 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: needs patch -> committed/rejected

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6709] It's possible to create TryExcept with no handlers

2012-11-09 Thread Benjamin Peterson

Benjamin Peterson added the comment:

This was fixed a while ago:

Traceback (most recent call last):
  File "", line 1, in 
ValueError: Try has neither except handlers nor finalbody

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6709] It's possible to create TryExcept with no handlers

2012-11-09 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +brett.cannon, georg.brandl, ncoghlan
stage:  -> needs patch
versions: +Python 3.3, Python 3.4 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6709] It's possible to create TryExcept with no handlers

2010-07-11 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions:  -Python 2.5, Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6709] It's possible to create TryExcept with no handlers

2009-08-14 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6709] It's possible to create TryExcept with no handlers

2009-08-14 Thread Benjamin Peterson

New submission from Benjamin Peterson :

I think we might need to devise some way to add custom validation when
AST is being compiled. For example, you can also pass a level to
ImportFrom which is < -1.

>>> x = ast.parse("try: x\nexcept y: pass")
>>> del x.body[0].handlers[:]
>>> compile(x, "", "exec")
 at 0x7f0a92aed918, file "", line 1>
>>> from dis import dis
>>> dis(x)
>>> dis(compile(x, "", "exec"))
  1   0 SETUP_EXCEPT 8 (to 11)
  3 LOAD_NAME0 (x)
  6 POP_TOP
  7 POP_BLOCK
  8 JUMP_FORWARD 1 (to 12)
>>   11 END_FINALLY
>>   12 LOAD_CONST   0 (None)
 15 RETURN_VALUE

--
components: Extension Modules, Interpreter Core
messages: 91587
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: It's possible to create TryExcept with no handlers
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com