when should I explicitly close a file?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Fri Apr 23 18:04:51 EDT 2010
On Fri, 23 Apr 2010 13:19:41 +0200, Alf P. Steinbach wrote:
> But for a literal context-free interpretation e.g. the 'sys.getrefcount'
> function is not documented as CPython only and thus an implementation
> that didn't do reference counting would not be a conforming Python
> implementation.
Since Jython and IronPython are conforming Python implementations, and
Guido has started making policy decisions specifically to support these
other implementations (e.g. the language feature moratorium, PEP 3003), I
think we can assume that this is a documentation bug.
However, a Python implementation that always returned 0 for
sys.getrefcount would technically satisfy the word of the documentation,
if not the spirit.
--
Steven
More information about the Python-list
mailing list