bpo-42102: [draft] make callable runtime subscriptable by hauntsaninja · Pull Request #22848 · python/cpython
https://bugs.python.org/issue42102
This is more just a suggestion of what this could look like than a serious PR, although it does work and does pass tests.
One important behaviour change in this PR is isinstance(x, callable) no longer raises a TypeError, instead only returning False. The decision of whether to make isinstance(x, callable) work is separate from whether to make callable runtime subscriptable, but it should either work or raise TypeError as today, not something in between.