Dong-hee Na <[email protected]> added the comment:
--- 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.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45489>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com