From a Steering Council perspective, it doesn’t seem like there is actual consensus on this issue.
I’m seeing what I’ll call “obvious” desire to alleviate past library/module/package naming mistakes that just make some things unnecessarily awkward to use (pprint.pprint
, etc.). But this PEP isn’t suggesting we change those to be callable. Which could confusing people even more when they switch back and forth between Python versions if we did, so it isn’t clear that we should. Given a time machine we’d likely have just chosen more appropriate namespace layout 20-30 years ago there without the repetition.
But the concerns about this one such as what does isinstance(when, callable_module_whos_call_returns_a_new_instance)
do vs people’s confusion of what they expect when they simply have a class (aka type) instead of a module and how to make callable()
work properly along with existing (somewhat hacky but well defined) way to make modules callable today via the __class__
assignment… lead us to conclude:
We aren’t seeing a strong argument in favor here, even though there are all times when we wish we could’ve had this as it appears simple at first glance. In reality it doesn’t seem so simple.
What next? As is, we’re not ready to accept this. If no seemingly strong consensus can be reached here, that’ll wind up as a decision to reject from the SC.