mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-39481: PEP 585 for dataclasses, mailbox, contextvars (GH-19425)
This commit is contained in:
parent
33986465bd
commit
d01628e411
5 changed files with 24 additions and 14 deletions
|
@ -7,6 +7,7 @@ import keyword
|
|||
import builtins
|
||||
import functools
|
||||
import _thread
|
||||
from types import GenericAlias
|
||||
|
||||
|
||||
__all__ = ['dataclass',
|
||||
|
@ -284,6 +285,8 @@ class Field:
|
|||
# it.
|
||||
func(self.default, owner, name)
|
||||
|
||||
__class_getitem__ = classmethod(GenericAlias)
|
||||
|
||||
|
||||
class _DataclassParams:
|
||||
__slots__ = ('init',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue