12.03.20 08:08, Ben Rudiak-Gould пише:
There are some cases in the standard library, e.g.
>>> import dbm.dumb
>>> db = dbm.dumb.open('foo')
>>> db.close()
>>> not db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: DBM object has already been closed
mmap.mmap also does this. Maybe it's a bug, or maybe the objects are
considered to be invalid and no longer fit for any use.
Uhm... Thanks, I did not know about these examples. This behavior is
explainable (the result depends on the context which is not available at
that moment), although may be not intended. I think it is not a bug.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/X6WCMQ6IHV5YJ2AYGBN4LZKT5Q4QZUHJ/
Code of Conduct: http://python.org/psf/codeofconduct/