[Python-Dev] Exception message for invalid with statement usage (original) (raw)
Georg Brandl g.brandl at gmx.net
Wed Sep 6 14:41:19 CEST 2006
- Previous message: [Python-Dev] inspect.py very slow under 2.5
- Next message: [Python-Dev] Exception message for invalid with statement usage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Current trunk:
with 1: ... print "1" ... Traceback (most recent call last): File "", line 1, in AttributeError: 'int' object has no attribute 'exit'
Isn't that a bit crude? For "for i in 1" there's a better error message, so why shouldn't the above give a TypeError: 'int' object is not a context manager
?
Georg
- Previous message: [Python-Dev] inspect.py very slow under 2.5
- Next message: [Python-Dev] Exception message for invalid with statement usage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]