This question was initially asked in tu...@python.org; Now I am widening
the audience to gain attention.
I want to create a decorator which should do the following things:
=> When an object of the decorated class is created, the objects name (say
the value of the incoming "id" argument) should be
On Tue, Feb 25, 2014 at 4:26 PM, alex23 wrote:
> On 25/02/2014 12:34 PM, Chris Angelico wrote:
>>
>> On Tue, Feb 25, 2014 at 1:24 PM, Alex Martelli wrote:
>>>
>>> At this point, all entries in the table should be deleted; query should
>>> return an empty list!
>>
>>
>> You can't actually depend o
On 25/02/2014 12:34 PM, Chris Angelico wrote:
On Tue, Feb 25, 2014 at 1:24 PM, Alex Martelli wrote:
At this point, all entries in the table should be deleted; query should
return an empty list!
You can't actually depend on del resulting in __del__ being called.
Mind those attributions, Chri
—
Sent from Mailbox for iPad
On Mon, Feb 24, 2014 at 8:49 PM, David Lawrence wrote:
> If as according to the docs, there is no guarantee of __del__ being called,
> anything that relies on that seems unsafe (depending on how robust one
> needs the solutions to be). Solutions I've seen elsewhere
If as according to the docs, there is no guarantee of __del__ being called,
anything that relies on that seems unsafe (depending on how robust one
needs the solutions to be). Solutions I've seen elsewhere suggest creating
something like a *release()* method on your objects and calling it
explicitl
On Tue, Feb 25, 2014 at 1:24 PM, Alex Martelli wrote:
> del a1
> del a2
> del a3
> del b1
> del b2
>
> At this point, all entries in the table should be deleted; query should
> return an empty list!
>
You can't actually depend on del resulting in __del__ being called.
The two are tangentially rel