Skip to content

runtime inspection of GenericAlias / typing._GenericAlias as an acceptable practice #1050

Answered by zzzeek
zzzeek asked this question in Q&A
Discussion options

You must be logged in to vote

OK folks, since I know this discussion forum is very active, and while @Akuli has been generous in their help for which I thank them, I think the answer I'm getting for my ultimate question about using generics on the right hand side for things is:

** awkward silence **

and that is a very good answer! it means everyone's more or less on the same page as I am , which is, "well, that's just not what we had in mind, though who can say...." and as Ive spent today thinking about this I will be doing it in some more traditional ways. for relationship() we will stick with the @overload thing and judicious use of Any to make typing it simple (thanks @Akuli for the Any tip) and for the "zippy new …

Replies: 4 comments 12 replies

Comment options

You must be logged in to vote
5 replies
@Akuli
Comment options

@zzzeek
Comment options

@zzzeek
Comment options

@Akuli
Comment options

@zzzeek
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@AlexWaygood
Comment options

@zzzeek
Comment options

@JelleZijlstra
Comment options

@zzzeek
Comment options

@zzzeek
Comment options

Answer selected by zzzeek
Comment options

You must be logged in to vote
1 reply
@zzzeek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants