Skip to content

Get or create import function #246

@guybedford

Description

@guybedford

Currently add_import_function on Module will allow adding duplicate imports, which is usually undesired.

A new get_or_create_import_function primitive would be very useful to enable idempotent semantics and avoiding of duplicate imports. Alternatively the existing add_import_function could possible be extended, but we are focusing on full backwards compat on the API for the most part, preferring to deprecate APIs over changing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions