Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Indicate in the docs that static typing doesn't work with lambda functions #2020

Open
Labels
@Dr-Irv

Description

@Dr-Irv

I sometimes get asked why alambda function can't be type-checked. And I believe the answer is that the arguments and result of alambda can't be inferred by a static type checker.

It might be worth adding something athttps://typing.python.org/en/latest/spec/callables.html#callables that tells people thatlambda functions can't be type checked (or if they can, what are the restrictions), and that the workaround is to create a typed functiondef that does what the lambda does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp