Skip to content

Why does Threading.Timer 'function' expect None as return type? #3782

@PGijsbers

Description

@PGijsbers

The Timer signature specifies that function should have the signature Callable[..., None]. I couldn't find anything in the official Timer documentation on why that would be. In my project I found myself using a function with return value (that I'm not interested in), and don't see why this should not be accepted usage. I think probably the correct signature should be Callable[..., Any]. Could someone clarify?

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