Hi,

 I encountered this quite a few times when learning pypy from internet
resources:
  the code like this

>>> open(’xxx’, ’w’).write(’stuff’)

This code is not working on pypy because it rely on CPython refcounting
behaviour.

I don't get it. Why ?  I thought the code should be similar to storing the
file object in temporary variable like this

>>> f = open('xxx', 'w')
>>> f.write('stuff')
>>> del f

Also, I've tried that with both Jython and IronPython and they all work
fine.

Why does this cause problem to pypy ?  Do I have to avoid writing code like
this in the future ?
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to