summaryrefslogtreecommitdiffstats
path: root/Lib/dataclasses.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r--Lib/dataclasses.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index 00851c6..fc69508 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -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',