On Sun, Mar 4, 2018 at 1:45 PM, Ooomzay <ooom...@gmail.com> wrote:
> On Sunday, 4 March 2018 01:58:02 UTC, Gregory Ewing  wrote:
>> ooomzay wrote:
>> > Well he was not telling you the whole story: RAII works just as well with
>> > heap objects using smart pointers (unique_ptr and friends) which are a 
>> > closer
>> > analogy to python object references.
>>
>> By that definition, *all* resource management in Python is
>> based on RAII[1].
>
> I think not. Objects may have a close() in their __del__ method as a back-up 
> - but currently this is not guaranteed to be called in a timely fashion. 
> Hence the
> justification for "with" and my proposal to obviate it by actually 
> guaranteeing
> that __del__ is always called in a timely fashion.

This thread is dead. The OP wants to wave a magic wand and say
"__del__ is now guaranteed to be called immediately", without any
explanation - and, from the look of things, without any understanding
- of what that means for the language and the interpreters. Everyone
else is saying "your magic wand is broken". This is not going to go
anywhere.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to