Message2038

Author dubnerm
Recipients
Date 2007-12-09.01:59:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Let's create file:
---qq.py
import sys
if hasattr(sys, 'exit'):
  print 'first if'
  del sys.exit
if hasattr(sys, 'exit'):
  print 'second if'
  del sys.exit
print 'done'
---cut
Now let's run it in standard python:
# python qq.py
first if
done
And now in jython:
# jython qq.py
first if
second if
Traceback (innermost last):
  File "qq.py", line 7, in ?
KeyError: exit

Example from standard library:
  # jython Lib/site.py
should output sys.path, but failes with following error:
  Traceback (innermost last):
    File "Lib\site.py", line 254, in ?
  KeyError: setdefaultencoding
History
Date User Action Args
2008-02-20 17:18:08adminlinkissue1847091 messages
2008-02-20 17:18:08admincreate