type checking

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Mon Oct 13 08:59:45 EDT 2003


On Mon, 13 Oct 2003 11:52:31 GMT, Alex Martelli <aleax at aleax.it>
wrote:

>The "immediate destruction when last reference gone" is an implementation
>specific detail of CPython -- handy, but there's quite a price paid for
>it, so the _language_ makes no guarantees.  So you have try/finally for
>those cases where you NEED guarantees (not as handy, admittedly).

Ah - I think I've just had one of those subtle but important paradigm
shifts. Resource management (for resources other than memory) simply
rests on slightly different language mechanisms in Python and Java
than it does in C++.

Oddly enough, I think my Python code has reflected this for some time
without me noticing the issue.


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk




More information about the Python-list mailing list