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, levkivskyi, serhiy.storchaka
Date 2020-04-26.16:35:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org>
In-reply-to
Content
typing._GenericAlias represents two different types: user defined (like List[int]) and special (like List). They have different behavior, and common methods contain special cases.

The proposed PR rewrites the implementation in more object-oriented paradigm: different classes for different behavior. _GenericAlias is split on three classes: user defined (it may be replaced with GenericAlias in future), special, and the base class for common methods. Its subclasses are also split on classes for special types Tuple and Callable and for parametrized Callable[] and Annotated[]. The work is not finished yet and the code is still complex.
History
Date User Action Args
2020-04-26 16:35:15serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, levkivskyi
2020-04-26 16:35:15serhiy.storchakasetmessageid: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org>
2020-04-26 16:35:15serhiy.storchakalinkissue40397 messages
2020-04-26 16:35:14serhiy.storchakacreate