Message384894
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. |
|
Date |
User |
Action |
Args |
2021-01-12 06:20:37 | rhettinger | set | recipients:
+ rhettinger, vstinner, python-dev, eltoder, serhiy.storchaka |
2021-01-12 06:20:36 | rhettinger | set | messageid: <1610432436.98.0.923190324839.issue42903@roundup.psfhosted.org> |
2021-01-12 06:20:36 | rhettinger | link | issue42903 messages |
2021-01-12 06:20:36 | rhettinger | create | |
|