Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> Tommy Nordgren wrote:
> > class MyClass : a_base_class
> > memberlist=[]
> >
> > # Insert object in memberlist when created;
> > # note: objects won't be garbage collected until removed from memberlist.
>
> Just to say, if you wanted to go abou
Tommy Nordgren wrote:
> class MyClass : a_base_class
> memberlist=[]
>
> # Insert object in memberlist when created;
> # note: objects won't be garbage collected until removed from memberlist.
Just to say, if you wanted to go about it that way, you could avoid the
garbage collection probl
On May 18, 11:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Terry schrieb:
>
>
>
> > On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
> >> escribió:
>
> >>> Is there a simple way to get all the instanc
On 17 maj 2008, at 01.44, Terry wrote:
Hi,
Is there a simple way to get all the instances of one class? I mean
without any additional change to the class.
br, Terry
--
http://mail.python.org/mailman/listinfo/python-list
class MyClass : a_base_class
memberlist=[]
# Insert object in
En Sun, 18 May 2008 12:32:28 -0300, Terry <[EMAIL PROTECTED]> escribió:
> On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
>> escribió:
>>
>> > Is there a simple way to get all the instances of one class? I mean
>
Terry schrieb:
On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
escribió:
Is there a simple way to get all the instances of one class? I mean
without any additional change to the class.
Try with gc.get_referrers()
On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
> escribió:
>
> > Is there a simple way to get all the instances of one class? I mean
> > without any additional change to the class.
>
> Try with gc.get_referrers()
>
On May 17, 8:04 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
> escribió:
>
> > Is there a simple way to get all the instances of one class? I mean
> > without any additional change to the class.
>
> Try with gc.get_referrers()
>
En Fri, 16 May 2008 20:44:00 -0300, Terry <[EMAIL PROTECTED]>
escribió:
Is there a simple way to get all the instances of one class? I mean
without any additional change to the class.
Try with gc.get_referrers()
py> import gc
py> class A(object): pass
...
py> a,b,c = A(),A(),A()
py> A
py>
Terry <[EMAIL PROTECTED]> writes:
> Is there a simple way to get all the instances of one class?
Define "all". All the instances in the current scope?
Perhaps more pertinent: What problem are you trying to address?
--
\ “We demand rigidly defined areas of doubt and uncertainty!” |
`
10 matches
Mail list logo