Python's "only one way to do it" philosophy isn't good?
nagle at animats.com
Thu Jul 5 23:09:42 CEST 2007
> On Jul 5, 10:30 am, "Chris Mellon" <arka... at gmail.com> wrote:
>>I don't think anyone has suggested that. Let me be clear about *my*
>>position: When you need to ensure that a file has been closed by a
>>certain time, you need to be explicit about it. When you don't care,
>>just that it will be closed "soonish" then relying on normal object
>>lifetime calls is sufficient. This is true regardless of whether
>>object lifetimes are handled via refcount or via "true" garbage
>>collection. Relying on the specific semantics of refcounting to give
>>certain lifetimes is a logic error.
We may need a guarantee that if you create a local object and
don't copy a strong reference to it to an outer scope, upon exit from
the scope, the object will be destroyed.
More information about the Python-list