← 返回首页
Allow Ellipsis as annotation for inferred type · Issue #276 · python/typing · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Allow Ellipsis as annotation for inferred type #276

New issue
New issue

Description

PEP 484 says that if an annotation is missing then the type assumed to be Any

def f(x) -> None: reveal_type(x) # Revealed type is 'Any' def g(x: int): pass reveal_type(g(1)) # Revealed type is 'Any'

However, it is not clear how to say to type checker that it should infer a missing type, rather than assume that it is Any. It was proposed by @ncoghlan to use Ellipsis for this purpose:

def f(x: ...) -> None: ... def g(x: int) -> ...: ...

I am opening this issue, so that this idea will not be forgotten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: featureDiscussions about new features for Python's type annotations

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.