Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Some other thoughts:

* A zero argument function that returns a constant is unlikely to ever be used 
in a tight loop. That would be pointless.

* The @cache decorator is already 30% faster than calling an empty function. 
It's very cheap.

* We really don't want the cache logic to get into the business of trying to 
deduce the arity of the function being cached.  That is a can of worms that we 
would regret opening.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to