Skip to content

itertools.starmap(func, zip(...)) #15481

@InSyncWithFoo

Description

@InSyncWithFoo

#14835 asked that FURB140 be changed to accommodate the pattern itertools.starmap(func, zip(...)), suggesting map(func, ...) as the replacement.

This comment lists four steps of improvements, of which the second doesn't seem to be actionable/applicable (FURB140 does not check for map). This issue discusses the third:

A new rule that recommends using map over starmap(func, zip)

starmap(func, zip(a, b, c)) can be transformed losslessly to map(func, a, b, c), so violations are both easy to detect and safely fixable, even with comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    previewRelated to preview mode featuresruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions