Skip to content

Commit ac7494f

Browse files
author
Guido van Rossum
committed
Stop supporting isinstance().
The big exception is isinstance(f, Callable), which is now equivalent to isinstance(f, collections.abc.Callable). Also other enhanced ABCs that shadow ABCs from collections.abc still support isinstance() -- but not the concrete classes (List, Dict, Set, FrozenSet). I'm sad to see the original Callable.__instancecheck__ go, but Mark Shannon's right that isinstance() with a type argument is just poorly defined. Fixes #135.
1 parent 108609f commit ac7494f

File tree

2 files changed

+71
-330
lines changed

2 files changed

+71
-330
lines changed

0 commit comments

Comments
 (0)