Skip to content

Be less strict about "All conditional function variants must have identical signatures" #1168

Closed
@gvanrossum

Description

@gvanrossum

This is one of the followups on #649. Example code:

try:
    from zlip import decompress
except ImportError:
    def decompress(val):
        raise RuntimeError

This produces "error: All conditional function variants must have identical signatures" on the def line. It would be nice if this were more lenient (e.g. computing the intersection of the imported definition and the given def).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions