Message3887

Author draghuram
Recipients draghuram, terrence
Date 2008-12-08.15:25:22
SpamBayes Score 0.00047920697
Marked as misclassified No
Message-id <1228749923.79.0.512458705453.issue1194@psf.upfronthosting.co.za>
In-reply-to
Content
I have confirmed this behaviour with the following simple script (run on
Linux).

---
from __future__ import with_statement

class test:
    def __init__(self):
        pass
        
    def __enter__(self):
        print "in enter"
        return self
    
    def __exit__(self, exc_type, exc_val, exc_tb):
        print "in exit"
        return False

def f():
    with test():
        return

f()    
---
akash$ jython testwith.py 
in enter

akash$ jython
Jython 2.5a3+ (trunk:5430M, Oct 16 2008, 12:29:25) 
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_06
History
Date User Action Args
2008-12-08 15:25:23draghuramsetmessageid: <1228749923.79.0.512458705453.issue1194@psf.upfronthosting.co.za>
2008-12-08 15:25:23draghuramsetrecipients: + draghuram, terrence
2008-12-08 15:25:23draghuramlinkissue1194 messages
2008-12-08 15:25:22draghuramcreate