Message397632
I think making NewType into a class isn't a good idea, it would be too slow. But I like issue34963 (PR 9951).
So then let's do some variation on (3) -- unionable things would include all types (of course), typevars, and things that have a special attribute. We could then set that special attribute on the function returned by NewType (like PR 9951 already does for __name__ and __qualname__).
What to call it? Maybe "__unionable__"? |
|
Date |
User |
Action |
Args |
2021-07-16 15:13:51 | gvanrossum | set | recipients:
+ gvanrossum, serhiy.storchaka, kj |
2021-07-16 15:13:51 | gvanrossum | set | messageid: <1626448431.5.0.321498243597.issue44642@roundup.psfhosted.org> |
2021-07-16 15:13:51 | gvanrossum | link | issue44642 messages |
2021-07-16 15:13:51 | gvanrossum | create | |
|