You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bare Union, Callable and Tuple should not be classes #133
There is no reason for "bare" Union, Callable or Tuple (i.e. without [...]) to be a class. You shouldn't ever write isinstance(x, Union) for example, and in their bare form these are not acceptable as annotations either.
Hm, that's a good point. Pretty much anything you can do with collections.abc.X should be possible with typing.X. (This does not apply to things that aren't defined in collection.abc though, so this is not the case for Union, Tuple or List etc.)
Activity
agronholm commentedon May 26, 2015
I've been using Callable like that. What's wrong with doing so? Should I import Callable from
collections.abcthen? Or always use Callable[..., Any]?gvanrossum commentedon May 26, 2015
Hm, that's a good point. Pretty much anything you can do with collections.abc.X should be possible with typing.X. (This does not apply to things that aren't defined in collection.abc though, so this is not the case for Union, Tuple or List etc.)
Kill __subclasscheck__ (#283)