Revamped generic class behavior to conform to updated PEP 484 by gvanrossum · Pull Request #195 · python/typing · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Security and quality 0

Revamp of generic classes. Dict[str, Tuple[S, T]] is now valid.

Backported revamp of generic classes to Python 2.

Make flake8 happy.

Remove the last _has_type_var().

Backport fixing the __module__ attribute of a NamedTuple.

Backport test_nested().

Decide meaning of alias with one generic and one concrete parameter #115

Merge branch 'master' into new_generic (

Merge branch 'master' into new_generic (backport

Improve speed of Generic.__new__. Both PY2 and PY3.

Confusing __class__ for instance of non-generic class that subclasses generic class #129

Allow type aliases such X = List[T] if T is a type variable python/mypy#606

Abandon attempts to support protocols in 3.5.0 and 3.5.1, see

Protocols in typing extensions #464