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-May/023894.html below:

[Python-Dev] iterzip()

[Python-Dev] iterzip()Martin v. Loewis martin@v.loewis.de
02 May 2002 09:10:01 +0200
Tim Peters <tim.one@comcast.net> writes:

> [martin@v.loewis.de]
> > I'd suggest a tp_is_immutable predicate. If a container is immutable
> > and non-cyclic, it can be untracked. A container is non-cyclic if all
> > contained objects are either non-gc, or untracked.
> 
> And none of the contained objects are NULL (else the scheme doesn't even
> work for tuples).

If a tuple contains a NULL, its tp_is_immutable will return false,
hence it won't be untracked, henced it isn't cyclic.

> How do you know which other objects it contains?  Calling tp_traverse and
> seeing whether that ever calls the passed-in visit function doesn't work
> (see the already-repeated discussion about this for tuples).

That's why I propose the tp_is_immutable predicate.

Regards,
Martin




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