René's URL Explorer Experiment


Title: Higher-Kinded TypeVars · Issue #548 · python/typing · GitHub

Open Graph Title: Higher-Kinded TypeVars · Issue #548 · python/typing

X Title: Higher-Kinded TypeVars · Issue #548 · python/typing

Description: aka type constructors, generic TypeVars Has there already been discussion about those? I do a lot of FP that results in impossible situations because of this. Consider an example: A = TypeVar('A') B = TypeVar('B') F = TypeVar('F') class ...

Open Graph Description: aka type constructors, generic TypeVars Has there already been discussion about those? I do a lot of FP that results in impossible situations because of this. Consider an example: A = TypeVar('A') ...

X Description: aka type constructors, generic TypeVars Has there already been discussion about those? I do a lot of FP that results in impossible situations because of this. Consider an example: A = TypeVar('...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Higher-Kinded TypeVars","articleBody":"aka type constructors, generic TypeVars\r\n\r\nHas there already been discussion about those?\r\nI do a lot of FP that results in impossible situations because of this. Consider an example:\r\n\r\n```python\r\nA = TypeVar('A')\r\nB = TypeVar('B')\r\nF = TypeVar('F')\r\n\r\nclass M(Generic[F[X], A]):\r\n    def x(fa: F[A], f: Callable[[A], B]) -\u003e F[B]:\r\n        return map(f, fa)\r\n\r\nM().x([1], str)\r\n```\r\n\r\nI haven't found a way to make this work, does anyone know a trick or is it impossible?\r\nIf not, consider the syntax as a proposal.\r\nReference implementations would be Haskell, Scala.\r\noptimally, the HK's type param would be indexable as well, allowing for `F[X[X, X], X[X]]`\r\n\r\n----\r\n\r\nSummary of current status (by @smheidrich, 2024-02-08):\r\n\r\n- @JelleZijlstra [has indicated interest](https://github.com/python/typing/issues/548#issuecomment-1193345123) in sponsoring a PEP, conditional on a prototype implementation in a major type checker and a well-specified draft PEP.\r\n- Drafting the PEP takes place in @nekitdev's [fork](https://github.com/nekitdev/peps) of the `peps` repo. The [**stub PEP draft**](https://github.com/nekitdev/peps/blob/main/pep-9999.rst) so far contains a few examples of the proposed syntax.\r\n- That same repo's [**GitHub Discussions forum**](https://github.com/nekitdev/peps/discussions) forum has been [designated](https://github.com/python/typing/issues/548#issuecomment-1193348994) as the place to discuss the PEP (and presumably the prototype implementation?). Some limited further discussions have taken place there.\r\n  - If you want to be notified of new discussion threads, I think you have to set the whole repo as \"watched\" in GitHub?\r\n","author":{"url":"https://github.com/tek","@type":"Person","name":"tek"},"datePublished":"2018-03-30T22:56:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":222},"url":"https://github.com/548/typing/issues/548"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ab98c6b0-9d7f-9629-f02c-c8aead7a887d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC062:D76E7:A63BFD:E3DF9E:6A62F14A
html-safe-nonce28b73a03313237e0a747afb7d0db8a8c336dedf92c60c650fab6e23979a87d70
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDYyOkQ3NkU3OkE2M0JGRDpFM0RGOUU6NkE2MkYxNEEiLCJ2aXNpdG9yX2lkIjoiNTAwMTI1ODQwNzc0OTg0MDEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd246599428d2e714433bdf497e60409161441647e9a226eaa602480e6965387d
hovercard-subject-tagissue:310187277
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/548/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ecd14f8013a457546c1f7cc1a363d43052ed605994cebac2b44c472bda008a2d/python/typing/issues/548
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ecd14f8013a457546c1f7cc1a363d43052ed605994cebac2b44c472bda008a2d/python/typing/issues/548
og:image:altaka type constructors, generic TypeVars Has there already been discussion about those? I do a lot of FP that results in impossible situations because of this. Consider an example: A = TypeVar('A') ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametek
hostnamegithub.com
expected-hostnamegithub.com
Noneb415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30
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
release22f98521e99f504294ab0812b66104d50eb75a70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing/issues/548#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F548
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F548
Sign up https://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/548
Reloadhttps://github.com/python/typing/issues/548
Reloadhttps://github.com/python/typing/issues/548
Please reload this pagehttps://github.com/python/typing/issues/548
python https://github.com/python
typinghttps://github.com/python/typing
Notifications https://github.com/login?return_to=%2Fpython%2Ftyping
Fork 304 https://github.com/login?return_to=%2Fpython%2Ftyping
Star 1.8k https://github.com/login?return_to=%2Fpython%2Ftyping
Code https://github.com/python/typing
Issues 204 https://github.com/python/typing/issues
Pull requests 28 https://github.com/python/typing/pulls
Discussions https://github.com/python/typing/discussions
Actions https://github.com/python/typing/actions
Security and quality 0 https://github.com/python/typing/security
Insights https://github.com/python/typing/pulse
Code https://github.com/python/typing
Issues https://github.com/python/typing/issues
Pull requests https://github.com/python/typing/pulls
Discussions https://github.com/python/typing/discussions
Actions https://github.com/python/typing/actions
Security and quality https://github.com/python/typing/security
Insights https://github.com/python/typing/pulse
Higher-Kinded TypeVarshttps://github.com/python/typing/issues/548#top
topic: featureDiscussions about new features for Python's type annotationshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20feature%22
https://github.com/tek
tekhttps://github.com/tek
on Mar 30, 2018https://github.com/python/typing/issues/548#issue-310187277
@smheidrichhttps://github.com/smheidrich
@JelleZijlstrahttps://github.com/JelleZijlstra
has indicated interesthttps://github.com/python/typing/issues/548#issuecomment-1193345123
@nekitdevhttps://github.com/nekitdev
forkhttps://github.com/nekitdev/peps
stub PEP drafthttps://github.com/nekitdev/peps/blob/main/pep-9999.rst
GitHub Discussions forumhttps://github.com/nekitdev/peps/discussions
designatedhttps://github.com/python/typing/issues/548#issuecomment-1193348994
topic: featureDiscussions about new features for Python's type annotationshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20feature%22
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.