Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Isolate the itertools extension module #101277

Closed
Assignees
erlend-aasland
Labels
type-featureA feature request or enhancement
@erlend-aasland

Description

@erlend-aasland

Feature or enhancement

Followinghttps://github.com/ericsnowcurrently/multi-core-python/wiki/0-The-Plan we need to convert theitertools extension module to use module state.

There are multiple static global type objects:

Modules/itertoolsmodule.c-_grouper_type-
Modules/itertoolsmodule.c-accumulate_type-
Modules/itertoolsmodule.c-batched_type-
Modules/itertoolsmodule.c-chain_type-
Modules/itertoolsmodule.c-combinations_type-
Modules/itertoolsmodule.c-compress_type-
Modules/itertoolsmodule.c-count_type-
Modules/itertoolsmodule.c-cwr_type-
Modules/itertoolsmodule.c-cycle_type-
Modules/itertoolsmodule.c-dropwhile_type-
Modules/itertoolsmodule.c-filterfalse_type-
Modules/itertoolsmodule.c-groupby_type-
Modules/itertoolsmodule.c-islice_type-
Modules/itertoolsmodule.c-pairwise_type-
Modules/itertoolsmodule.c-permutations_type-
Modules/itertoolsmodule.c-product_type-
Modules/itertoolsmodule.c-repeat_type-
Modules/itertoolsmodule.c-starmap_type-
Modules/itertoolsmodule.c-takewhile_type-
Modules/itertoolsmodule.c-tee_type-
Modules/itertoolsmodule.c-teedataobject_type-
Modules/itertoolsmodule.c-ziplongest_type-

We need to convert these to heap types, add module state, and implement multi-phase init.

See alsoPEP-687.

I've got an old PR (#24065) that I'm planning on resurrecting. I'll re-submit it as multiple PRs; this is going to be a large change.

For this particular module, it could make sense to add a module state pointer to each type context, for easy and cheap state access.

Linked PRs

Metadata

Metadata

Labels

type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp