Issue1766527
Created on 2007-08-03.03:08:06 by swansoncw, last changed 2007-08-12.04:53:12 by cgroves.
File name |
Uploaded |
Description |
Edit |
Remove |
testit.py
|
swansoncw,
2007-08-03.03:08:06
|
test case testit.py |
|
|
msg1797 (view) |
Author: swansoncw (swansoncw) |
Date: 2007-08-03.03:08:06 |
|
python testit.py
yes
yes
yes
yes
#================================================
jython testit.py
not
not
not
not
#================================================
jython < testit.py | grep -v '{'
Jython 2.2rc3 on java1.6.0_01
Type "copyright", "credits" or "license" for more information.
>>> >>> >>> ... ... ... ... ... >>> not
>>> not
>>> >>> not
>>> yes
|
msg1798 (view) |
Author: Charlie Groves (cgroves) |
Date: 2007-08-12.04:53:12 |
|
This is caused by LazyDict in javaos not overriding the __contains__ method. The 'in' keyword calls __contain__, and since LazyDict doesn't override it, it doesn't actually populate its dictionary before returning. The reason is succeeds when you send the script in on std in is because Jython prints out the 'os.environ' line in that case which calls __repr__ on LazyDict and causes it to populate.
I fixed this on the trunk in r3407. However, unless a larger bug comes up, I don't think this merits another release candidate so it's not going to make it into 2.2. When 2.2.1 is released, I'll copy the fix over.
|
|
Date |
User |
Action |
Args |
2007-08-03 03:08:06 | swansoncw | create | |
|