On Thu, Mar 8, 2018 at 5:17 AM, Ooomzay wrote:
> On Thursday, 1 March 2018 22:44:59 UTC, Rob Gaddi wrote:
>> On 03/01/2018 02:24 PM, Lawrence D’Oliveiro wrote:
>> > On Thursday, March 1, 2018 at 6:44:39 PM UTC+13, Paul Rubin wrote:
>> >> DOM trees are a classic example (see the various DOM module
On Thursday, 1 March 2018 22:44:59 UTC, Rob Gaddi wrote:
> On 03/01/2018 02:24 PM, Lawrence D’Oliveiro wrote:
> > On Thursday, March 1, 2018 at 6:44:39 PM UTC+13, Paul Rubin wrote:
> >> DOM trees are a classic example (see the various DOM modules in the
> >> Python stdlib). Non-leaf nodes have a
Richard Damon wrote:
The
idea was to have a way to mark that certain classes/objects request that
they are reference counted so they get the __del__ called as soon as the
last reference goes away, without needing to require that overhead for
all objects in all implementations.
That could be
Steven D'Aprano wrote:
Not just the class __dict__. You would have to do a full search of the
MRO looking for any superclass which defines such methods.
That could be reduced a lot by making it a type slot. But
it would still increase the overhead of every refcount change
by at least a factor o
Paul Rubin wrote:
Richard Damon writes:
a class to define member functions like __ref__
and __unref__ (or perhaps some other name) that if defined, would be
called every time a name was bound or unbound to an object?
That sounds horrendous and wouldn't handle the case of a list element
creat
On 3/3/18 6:57 PM, Steven D'Aprano wrote:
On Sat, 03 Mar 2018 10:01:43 -0700, Ian Kelly wrote:
On Sat, Mar 3, 2018 at 9:19 AM, Richard Damon
wrote:
One idea does come to mind though, would it be reasonable, and somewhat
Pythonic, for a class to define member functions like __ref__ and
__unref
On Sat, 03 Mar 2018 10:01:43 -0700, Ian Kelly wrote:
> On Sat, Mar 3, 2018 at 9:19 AM, Richard Damon
> wrote:
>> One idea does come to mind though, would it be reasonable, and somewhat
>> Pythonic, for a class to define member functions like __ref__ and
>> __unref__ (or perhaps some other name) t
On Sun, Mar 4, 2018 at 3:19 AM, Richard Damon wrote:
> One idea does come to mind though, would it be reasonable, and somewhat
> Pythonic, for a class to define member functions like __ref__ and __unref__
> (or perhaps some other name) that if defined, would be called every time a
> name was bound
On Sun, Mar 4, 2018 at 3:19 AM, Richard Damon wrote:
> On 3/3/18 9:03 AM, Ian Kelly wrote:
>>
>> On Fri, Mar 2, 2018 at 9:57 PM, Gregory Ewing
>> wrote:
>>>
>>> Paul Rubin wrote:
So you want the programmer to put more head scratching into figuring out
which reference should be stro
On Sat, Mar 3, 2018 at 9:19 AM, Richard Damon wrote:
> One idea does come to mind though, would it be reasonable, and somewhat
> Pythonic, for a class to define member functions like __ref__ and __unref__
> (or perhaps some other name) that if defined, would be called every time a
> name was bound
On 3/3/18 9:03 AM, Ian Kelly wrote:
On Fri, Mar 2, 2018 at 9:57 PM, Gregory Ewing
wrote:
Paul Rubin wrote:
So you want the programmer to put more head scratching into figuring out
which reference should be strong and which should be weak?
Also, sometimes weak references don't really solve th
On Fri, Mar 2, 2018 at 9:57 PM, Gregory Ewing
wrote:
> Paul Rubin wrote:
>>
>> So you want the programmer to put more head scratching into figuring out
>> which reference should be strong and which should be weak?
>
>
> Also, sometimes weak references don't really solve the
> problem, e.g. if you
Paul Rubin wrote:
So you want the programmer to put more head scratching into figuring out
which reference should be strong and which should be weak?
Also, sometimes weak references don't really solve the
problem, e.g. if you have a graph where you can't identify
any particular node as a "root"
On Friday, March 2, 2018 at 1:59:02 AM UTC, Lawrence D’Oliveiro wrote:
> On Friday, March 2, 2018 at 1:03:08 PM UTC+13, ooo...@gmail.com wrote:
> > On Thursday, March 1, 2018 at 11:51:50 PM UTC, Lawrence D’Oliveiro wrote:
> >> On Friday, March 2, 2018 at 12:39:01 PM UTC+13, ooo...@gmail.com wrote:
On Thursday, March 1, 2018 at 11:51:50 PM UTC, Lawrence D’Oliveiro wrote:
> On Friday, March 2, 2018 at 12:39:01 PM UTC+13, ooo...@gmail.com wrote:
> > class RAIIFileAccess():
> > '''File Access-like Resource using [RAII] idiom'''
> >
> > ...
> >
> > def __del__(self):
> >
On 03/01/2018 02:24 PM, Lawrence D’Oliveiro wrote:
On Thursday, March 1, 2018 at 6:44:39 PM UTC+13, Paul Rubin wrote:
DOM trees are a classic example (see the various DOM modules in the
Python stdlib). Non-leaf nodes have a list of child nodes, child nodes
have pointers back upwards to their pa
16 matches
Mail list logo