Terry J. Reedy <tjre...@udel.edu> added the comment:
Steven, thank you for splitting this off for proper discussion. To me, the base issue is that CPython is both the language reference implementation and, as yet, the main production implementation. As the latter, it has unintended and unwanted bugs and intentional optimizations added for performance rather than language conformance. Some of these, like caching, affect boolean results involving 'is' and id(). Problems arise when people confuse reference features with implementation features. This issue proposes adding a mode that turns off certain optimization features. There is another proposal to turn off other optimizations (again during code analysis and testing) that affect tracing results and sometimes coverage results based thereon, giving false negatives. In either case, I see the result as a 'language reference' mode. As Steven suggested, the result is in a sense less chaotic, not more. A chaos mode for caching would randomly cache or not. Multiple comments above contain 'bug'. Given that the language leaves implementations to cache certain immutables -- or not -- the bug in code meant to be implementation independent is to depend on caching *either way*. Turning caching off only catches the 'bug' of assuming caching, not the bug of assuming no caching. >From a math viewpoint, n is n for all n, so 'is' *is* the proper comparison >for ints. From this viewpoint, caching should be the default and having not >caching most values of n, and having to use '==' instead of 'is', is the >practice time-space tradeoff compromise. Like Raymond, I currently think that this proposal lacks sufficient justification. ---------- nosy: +terry.reedy type: -> enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34867> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com