This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients bobbeyreese, corona10, gvanrossum, kj
Date 2021-10-16.13:43:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634391814.27.0.892958821982.issue45489@roundup.psfhosted.org>
In-reply-to
Content
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -719,6 +719,12 @@ def __eq__(self, other):
     def __hash__(self):
         return hash(self.__forward_arg__)

+    def __or__(self, other):
+        return Union[self, other]
+
+    def __ror__(self, other):
+        return Union[other, self]
+
     def __repr__(self):
         return f'ForwardRef({self.__forward_arg__!r})'

This can be easily fixed, but I am waiting for guido and ken to check whether this is an intentioned operation.
History
Date User Action Args
2021-10-16 13:43:34corona10setrecipients: + corona10, gvanrossum, kj, bobbeyreese
2021-10-16 13:43:34corona10setmessageid: <1634391814.27.0.892958821982.issue45489@roundup.psfhosted.org>
2021-10-16 13:43:34corona10linkissue45489 messages
2021-10-16 13:43:34corona10create