[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: I agree with Ivan. This is a no go for parametrized pseudotypes. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-09-01 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: TBH, I don't like this idea. Consider this situation: @singledispatch def what(x: Iterable) -> None: print('general case') @what.register def _(x: Sequence[int]) -> None: print('special case') what(['is', 'going', 'on'])

[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-08-31 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-08-25 Thread Dutcho
New submission from Dutcho : While issue #34498 signalled a break in Python 3.7 of legal Python 3.6 code that registers a single-dispatch function with a 'pseudo-type' like typing.Sequence, both Python 3.6 and Python 3.7 don't work with a 'parametrized pseudo-type' like typing.Sequence[int].