Message3887
 
            
            
            
 
   
   
 
 
  
      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 | 
   
  
 
|
 
| Date | 
User | 
Action | 
Args | 
 
| 2008-12-08 15:25:23 | draghuram | set | messageid: <1228749923.79.0.512458705453.issue1194@psf.upfronthosting.co.za> |  
| 2008-12-08 15:25:23 | draghuram | set | recipients:
  + draghuram, terrence |  
| 2008-12-08 15:25:23 | draghuram | link | issue1194 messages |  
| 2008-12-08 15:25:22 | draghuram | create |  |  
 
 
 |