[Python-bugs-list] 'python -U' breaks eval/exec (PR#375)

tpeters@beopen.com tpeters@beopen.com
Thu, 29 Jun 2000 02:32:01 -0400 (EDT)


Full_Name: Tim Peters
Version: 1.6a2
OS: Win32
Submission from: waf-dc1b-135.rasserver.net (206.217.144.135)


Moving this bug from the SourceForge Bug Manager,
https://sourceforge.net/bugs/?func=detailbug&bug_id=107608&group_id=5470

Original Submission:
Freshly built python: 

[mwh21@atrus build]$ PYTHONSTARTUP= ./python -U 
'import site' failed; use -v for traceback 
Python 1.6a2 (#1, Jun 17 2000, 00:21:58) [GCC 2.95.1 19990816/Linux (release)]
on linux2 
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam 
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI) 
>>> eval("1") 
Traceback (most recent call last): 
File "<stdin>", line 1, in ? 
TypeError: eval() argument 1 must be string or code object 

(this is also why the import site fails). 

exec is also broken.

[I believe this was originally sent in by Michael Hudson - tgp]

Comment from Guido:  eval and exec need to support Unicode objects. 
This may be hard, and since -U is mostly experimental, I've given it a low
priority.