A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-April/023837.html below:

[Python-Dev] iterzip()

[Python-Dev] iterzip()Guido van Rossum guido@python.org
Tue, 30 Apr 2002 08:58:12 -0400
[Tim]
> > Half of a shadow of an idea: at least in my code, it's common to
> > have gazillions of tuples, and they almost always contain just
> > strings and numbers.  Since they're immutable, they'll never
> > contain anything else.  So they could get unlinked from cyclic gc
> > entirely without ill effect (it's not possible that they could
> > ever be in a cycle).  Perhaps a gen2 collection could learn
> > something about this and automagically untrack them.

[MvL]
> That could happen in gen0 already: when traversing an object, watch
> whether it contains any tracked objects. If it doesn't, invoke
> tp_is_immutable, if that returns true, untrack it.

Unfortunately, the visit API doesn't make it easy to watch this; a
tuple calls visit() on its items but learns nothing except whether it
failed.  (I've never seen a visit() implementation that could fail, so
I'm not sure even why the return code exists.)

--Guido van Rossum (home page: http://www.python.org/~guido/)




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4