Title: Bad error message when inheriting from Generic multiple times · Issue #104328 · python/cpython · GitHub
Open Graph Title: Bad error message when inheriting from Generic multiple times · Issue #104328 · python/cpython
X Title: Bad error message when inheriting from Generic multiple times · Issue #104328 · python/cpython
Description: >>> from typing import Generic, TypeVar >>> T = TypeVar("T") >>> U = TypeVar("U") >>> class X(Generic[T], Generic[U]): pass ... Traceback (most recent call last): File "
Open Graph Description: >>> from typing import Generic, TypeVar >>> T = TypeVar("T") >>> U = TypeVar("U") >>> class X(Generic[T], Generic[U]): pass ... Traceback (most recent call last): File " X Description: >>> from typing import Generic, TypeVar >>> T = TypeVar("T") >>> U = TypeVar("U") >>> class X(Generic[T], Generic[U]): pass ... Traceback (mo...
Opengraph URL: https://github.com/python/cpython/issues/104328
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bad error message when inheriting from Generic multiple times","articleBody":"```\r\n\u003e\u003e\u003e from typing import Generic, TypeVar\r\n\u003e\u003e\u003e T = TypeVar(\"T\")\r\n\u003e\u003e\u003e U = TypeVar(\"U\")\r\n\u003e\u003e\u003e class X(Generic[T], Generic[U]): pass\r\n... \r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/Users/jelle/py/cpython/Lib/typing.py\", line 1088, in _generic_init_subclass\r\n raise TypeError(\r\nTypeError: Cannot inherit from Generic[...] multiple types.\r\n```\r\n\r\nShould say \"multiple times\".\r\n\r\nNoticed by @carljm in https://github.com/python/cpython/pull/103764#discussion_r1187992790.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-104335\n* gh-104338\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-05-09T14:51:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/104328/cpython/issues/104328"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:ac8c619c-bb1a-bb03-2954-41f2017b8e70 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id D8E8:225E33:1052BA7:15E846F:696992BF html-safe-nonce c56126cec6b1d71714acedf309d7aea808adbdcca644ead404bbe9872cc34942 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEU4OjIyNUUzMzoxMDUyQkE3OjE1RTg0NkY6Njk2OTkyQkYiLCJ2aXNpdG9yX2lkIjoiNzU4NTAwMDYxOTc1MTYwOTAyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac cf45bdcb5fe413519d3f14106a5c84479e2e646009cddd377f25f85764993915 hovercard-subject-tag issue:1702205961 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/104328/issue_layout twitter:image https://opengraph.githubassets.com/7df48ede0b7e761e07918edc504a7ade44f70f9b211e2986d38c36f8901f11f7/python/cpython/issues/104328 twitter:card summary_large_image og:image https://opengraph.githubassets.com/7df48ede0b7e761e07918edc504a7ade44f70f9b211e2986d38c36f8901f11f7/python/cpython/issues/104328 og:image:alt >>> from typing import Generic, TypeVar >>> T = TypeVar("T") >>> U = TypeVar("U") >>> class X(Generic[T], Generic[U]): pass ... Traceback (most recent call last): File " og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username JelleZijlstra hostname github.com expected-hostname github.com None 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 turbo-cache-control no-preview go-import github.com/python/cpython git https://github.com/python/cpython.git octolytics-dimension-user_id 1525981 octolytics-dimension-user_login python octolytics-dimension-repository_id 81598961 octolytics-dimension-repository_nwo python/cpython octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 81598961 octolytics-dimension-repository_network_root_nwo python/cpython turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release af80af7cc9e3de9c336f18b208a600950a3c187c ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.