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
TECTED]>
> >> 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
> >>
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 the
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
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
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
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(
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 do
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
11 matches
Mail list logo