Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68298 > unrolled thread
| Started by | Jurko Gospodnetić <jurko.gospodnetic@pke.hr> |
|---|---|
| First post | 2014-03-12 22:28 +0100 |
| Last post | 2014-03-12 22:28 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: What does gc.get_objects() return? Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-03-12 22:28 +0100
| From | Jurko Gospodnetić <jurko.gospodnetic@pke.hr> |
|---|---|
| Date | 2014-03-12 22:28 +0100 |
| Subject | Re: What does gc.get_objects() return? |
| Message-ID | <mailman.8104.1394659708.18130.python-list@python.org> |
Hi.
On 12.3.2014. 21:02, MRAB wrote:
>> I was wondering if someone could explain gc.get_objects() in a bit
>> more detail to me.
>>
>> Does it return a list of 'all objects known to Python'? Only some of
>> them? Which does it return? Which it does not?
>>
>
> gc.is_tracked(...) might be relevant to your question.
Thanks! The documentation for gc.is_tracked() straightened me out. :-)
So gc.collect() returns a list of all the objects GC is in charge of,
and which instances are and are not tracked by the GC is, I guess, an
interpreter implementation detail.
For CPython 3.4 I guess strings and other atomic types such as ints
are not, as well as raw object() instances. Custom class instances on
the other hand seem to be under GC control.
Thanks again.
Best regards,
Jurko Gospodnetić
Back to top | Article view | comp.lang.python
csiph-web