[Python-Dev] confusing exec error message in 3.0 (original) (raw)
Georg Brandl g.brandl at gmx.net
Thu Aug 28 00:39:01 CEST 2008
- Previous message: [Python-Dev] confusing exec error message in 3.0
- Next message: [Python-Dev] confusing exec error message in 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fredrik Lundh schrieb:
(using 3.0a4)
>>> exec(open("file.py")) Traceback (most recent call last): File "", line 1, in TypeError: exec() arg 1 must be a string, file, or code object, not TextIOWrapper so what's "file" referring to here? (the above works under 2.5, of course)
See http://bugs.python.org/issue1762972 -- it has been decided to drop that possibility.
I've a patch that fixes the wrong error message in http://bugs.python.org/issue3706.
Georg
- Previous message: [Python-Dev] confusing exec error message in 3.0
- Next message: [Python-Dev] confusing exec error message in 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]