René's URL Explorer Experiment


Title: Proposal: Generalize `Callable` to be able to specify argument names and kinds · Issue #264 · python/typing · GitHub

Open Graph Title: Proposal: Generalize `Callable` to be able to specify argument names and kinds · Issue #264 · python/typing

X Title: Proposal: Generalize `Callable` to be able to specify argument names and kinds · Issue #264 · python/typing

Description: Right now you can specify callables with two patterns of arguments (shown here by example): Callable[..., int] takes in any arguments, any number. Callable[[int, str, bool], int] takes in a predetermined number of required positional arg...

Open Graph Description: Right now you can specify callables with two patterns of arguments (shown here by example): Callable[..., int] takes in any arguments, any number. Callable[[int, str, bool], int] takes in a predete...

X Description: Right now you can specify callables with two patterns of arguments (shown here by example): Callable[..., int] takes in any arguments, any number. Callable[[int, str, bool], int] takes in a predete...

Opengraph URL: https://github.com/python/typing/issues/264

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Generalize `Callable` to be able to specify argument names and kinds","articleBody":"Right now you can specify callables with two patterns of arguments (shown here by example):\n- `Callable[..., int]` takes in any arguments, any number.\n- `Callable[[int, str, bool], int]` takes in a predetermined number of required positional arguments, none of which have names specified.\n\nThese don't cleanly match the actual types of callable objects in Python.  Argument names, whether arguments are optional, and whether arguments are `*args` or `**kwargs` do affect the type of a callable.  We should be able to spell these things in the type language.  Doing so would enable us to correctly write the types of callback functions, for example.\n\nCallable should take two arguments: an _argument list_ and a _return type_.  The return type is exactly as currently described in PEP484.  The argument list is either:\n- `...`, indicating the function can take any arguments at all.\n- Square brackets around a comma separated series of _argument specifiers_ (_argspec_ for short), indicating particulars about the functions arguments\n\nAn _argument specifier_ is one of:\n- A bare type `TYP`. This has the same meaning as `Arg(TYP)`\n- `Arg(type, name=None)`, indicating a positional argument.  If the name is specified, the argument must have that name.\n- `OptionalArg(type, name=None)`, indicating an optional positional argument.  If the name is specified, the argument must have that name. (alternate name possibility `OptArg(type, name=None)`\n- `StarArg(type)`, indicating a \"star argument\" like `*args`\n- `KwArg(type)`, indicating a \"double star argument\" like `**kwargs`. (an alternate name here would be `Star2Arg(type)`.\n\nThe round parens are an indication that these are not actual _types_ but rather this new _argument specifier_ thing.\n\nLike the rules for python function arguments, all positional argspecs must come before all optional argspecs must come before zero or one star argspecs must come before zero or one kw argspecs.  \n\nThis should be able to spell all function types you can make in python by defining single functions or methods, with the exception of functions that need `SelfType` to be properly specified, which is an orthogonal concern.\n\nSome statements I think are true:\n- `Callable[[Arg(T1, name='foo'), Arg(T2, name='bar')], R]` is a subtype of `Callable[[T1, T2], R]` \n- `Callable[[T1, OptionalArg(T2)], R]` is a subtype of `Callable[[T1], R]`\n- `Callable[[StarArg(T1)], R]` is a subtype of `Callable[[], R]` and is also a subtype of `Callable[[T1], R]` and is also a subtype of `Callable[[T1, T1], R]` and so on.\n- `Callable[[T1, StarArg(T1)], R]` is a subtype of `Callable[[T1], R]` and is also a subtype of `Callable[[T1, T1], R]` and so on, but is not a subtype of `Callable[[], R]`\n- If we want to be able to spell overloaded function types we'll need a specific way of combining callable types in the specific way overloading works; this proposal doesn't address that.\n","author":{"url":"https://github.com/sixolet","@type":"Person","name":"sixolet"},"datePublished":"2016-08-19T00:37:17Z","url":"https://github.com/python/typing/issues/264"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6141d0e3-4f40-5696-7daa-9ebf90245a7f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC48A:1A1C04:1827F84:20A6E56:6AFFF211
html-safe-nonce0d89b65f6cebb8a7231d40eb5e11881e4fda39a07c0a76a29765dc1749e50471
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDhBOjFBMUMwNDoxODI3Rjg0OjIwQTZFNTY6NkFGRkYyMTEiLCJ2aXNpdG9yX2lkIjoiMzE2MTY0NjYxMDg4MzAxNTE4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6bd5716f4fbaddc18f3cb74b122baf6182cc631095c4cb41862dc987cd10c6e3
hovercard-subject-tagissue:172031574
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typing/264/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ee8fed9189c41f9e3294d3c56d79be2cdfae020e7a82604791a75b4f5de15d0a/python/typing/issues/264
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ee8fed9189c41f9e3294d3c56d79be2cdfae020e7a82604791a75b4f5de15d0a/python/typing/issues/264
og:image:altRight now you can specify callables with two patterns of arguments (shown here by example): Callable[..., int] takes in any arguments, any number. Callable[[int, str, bool], int] takes in a predete...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesixolet
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typing/issues/264#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F264
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F264
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftyping
Reloadhttps://github.com/python/typing/issues/264
Reloadhttps://github.com/python/typing/issues/264
Reloadhttps://github.com/python/typing/issues/264
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
https://github.com/python/typing
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/264
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/264
Proposal: Generalize Callable to be able to specify argument names and kindshttps://github.com/python/typing/issues/264#top
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issue-172031574
Nexthttps://github.com/python/typing/issues/264?timeline_page=1
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-240901320
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-240901784
@JukkaLhttps://github.com/JukkaL
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-240991411
@sixolethttps://github.com/sixolet
#239https://github.com/python/typing/issues/239
#239https://github.com/python/typing/issues/239
@JukkaLhttps://github.com/JukkaL
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241067473
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241067498
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241081940
@ilevkivskyihttps://github.com/ilevkivskyi
@sixolethttps://github.com/sixolet
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241142427
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241151095
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241151178
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 19, 2016https://github.com/python/typing/issues/264#issuecomment-241153693
@sixolethttps://github.com/sixolet
https://github.com/elazarg
elazarghttps://github.com/elazarg
on Oct 21, 2016https://github.com/python/typing/issues/264#issuecomment-255344681
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 21, 2016https://github.com/python/typing/issues/264#issuecomment-255347702
https://github.com/sixolet
sixolethttps://github.com/sixolet
on Oct 25, 2016https://github.com/python/typing/issues/264#issuecomment-255901077
@Lazarghttps://github.com/Lazarg
https://github.com/elazarg
elazarghttps://github.com/elazarg
on Oct 25, 2016https://github.com/python/typing/issues/264#issuecomment-255901532
https://github.com/elazarg
elazarghttps://github.com/elazarg
on Oct 25, 2016https://github.com/python/typing/issues/264#issuecomment-256141949
https://github.com/devxpy
devxpyhttps://github.com/devxpy
on Nov 7, 2018https://github.com/python/typing/issues/264#issuecomment-436525286
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Nov 7, 2018https://github.com/python/typing/issues/264#issuecomment-436621831
@Seanny123https://github.com/Seanny123
@devxpyhttps://github.com/devxpy
#239https://github.com/python/typing/issues/239
msullivanhttps://github.com/msullivan
on Jan 15, 2019https://github.com/python/typing/issues/264#event-2073376885
Better callable: `Callable[[Arg('x', int), VarArg(str)], int]` now a …https://github.com/python/mypy_extensions/commit/ba070d9fa43e2017cdfd17273af4d5373506751c
ba070d9https://github.com/python/mypy_extensions/commit/ba070d9fa43e2017cdfd17273af4d5373506751c
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on May 30, 2019https://github.com/python/typing/issues/264#issuecomment-497394202
PEP 544https://www.python.org/dev/peps/pep-0544/
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on May 30, 2019https://github.com/python/typing/issues/264#issuecomment-497453851
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497698340
https://github.com/antonagestam
antonagestamhttps://github.com/antonagestam
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497707610
https://github.com/Michael0x2a
Michael0x2ahttps://github.com/Michael0x2a
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497783322
https://github.com/jdelic
jdelichttps://github.com/jdelic
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497821796
@antonagestamhttps://github.com/antonagestam
https://github.com/antonagestam
antonagestamhttps://github.com/antonagestam
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497836749
@jdelichttps://github.com/jdelic
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on May 31, 2019https://github.com/python/typing/issues/264#issuecomment-497852840
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Jun 2, 2019https://github.com/python/typing/issues/264#issuecomment-497990162
https://github.com/ambv
ambvhttps://github.com/ambv
on Nov 11, 2019https://github.com/python/typing/issues/264#issuecomment-552438795
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 11, 2019https://github.com/python/typing/issues/264#issuecomment-552616740
gvanrossumhttps://github.com/gvanrossum
completedhttps://github.com/python/typing/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 11, 2019https://github.com/python/typing/issues/264#event-2789321523
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typing/issues/264
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typing/issues/264
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.