diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-26 19:02:58 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 19:02:58 (GMT) |
| commit | 8a37e8cf45105fbb592c31ebd30501bbdea5ab81 (patch) | |
| tree | efed9f23223fb796e924fd2ea0ea7d2add7b878a /Objects/unionobject.c | |
| parent | 16a174f7bac481ff6f859179b30a74d867747137 (diff) | |
| download | cpython-8a37e8cf45105fbb592c31ebd30501bbdea5ab81.zip cpython-8a37e8cf45105fbb592c31ebd30501bbdea5ab81.tar.gz cpython-8a37e8cf45105fbb592c31ebd30501bbdea5ab81.tar.bz2 | |
bpo-44732: Rename types.Union to types.UnionType (GH-27342)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0)
Co-authored-by: Hasan <hasan.aleeyev@gmail.com>
Diffstat (limited to 'Objects/unionobject.c')
| -rw-r--r-- | Objects/unionobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 475311e..9e670b4 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -1,4 +1,4 @@ -// types.Union -- used to represent e.g. Union[int, str], int | str +// types.UnionType -- used to represent e.g. Union[int, str], int | str #include "Python.h" #include "pycore_object.h" // _PyObject_GC_TRACK/UNTRACK #include "pycore_unionobject.h" @@ -414,7 +414,7 @@ union_parameters(PyObject *self, void *Py_UNUSED(unused)) } static PyGetSetDef union_properties[] = { - {"__parameters__", union_parameters, (setter)NULL, "Type variables in the types.Union.", NULL}, + {"__parameters__", union_parameters, (setter)NULL, "Type variables in the types.UnionType.", NULL}, {0} }; @@ -424,7 +424,7 @@ static PyNumberMethods union_as_number = { PyTypeObject _PyUnion_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) - .tp_name = "types.Union", + .tp_name = "types.UnionType", .tp_doc = "Represent a PEP 604 union type\n" "\n" "E.g. for int | str", |
