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 serhiy.storchaka
Recipients gvanrossum, kj, serhiy.storchaka
Date 2021-07-15.16:47:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626367647.84.0.0409964892759.issue44642@roundup.psfhosted.org>
In-reply-to
Content
It is only reminder that our test for NewType is arbitrary. And it is not compatible with PR 9951. Possible solutions are:

1. Make NewType a class and add more strict test. Pro -- we can make arbitrary repr, contra -- it has small negative effect on performance. See issue34963.

2. Remove the test for NewType at all and allow or-ing types and arbitrary functions.

3. Introduce a special attribute to distinguish unionable objects. It will make the code of unionobject.c simpler.

I lean towards option 1 (not excluding 3). Small performance losses seem inevitable.
History
Date User Action Args
2021-07-15 16:47:27serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, kj
2021-07-15 16:47:27serhiy.storchakasetmessageid: <1626367647.84.0.0409964892759.issue44642@roundup.psfhosted.org>
2021-07-15 16:47:27serhiy.storchakalinkissue44642 messages
2021-07-15 16:47:27serhiy.storchakacreate