消息 [397632]
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__"? |
|
| 日期 |
用户 |
动作 |
参数 |
| 2021-07-16 15:13:51 | gvanrossum | 修改 | recipients:
+ gvanrossum, serhiy.storchaka, kj |
| 2021-07-16 15:13:51 | gvanrossum | 修改 | messageid: <1626448431.5.0.321498243597.issue44642@roundup.psfhosted.org> |
| 2021-07-16 15:13:51 | gvanrossum | 链接 | issue44642 messages |
| 2021-07-16 15:13:51 | gvanrossum | 创建 | |
|