On Tue, May 2, 2017 at 6:52 AM, Terry Reedy <tjre...@udel.edu> wrote:
> The promise makes it clear that breaking the property is a bug to be fixed.
> It only decreases the probability for someone who has read the promise.
> Unfortunately, 'never fail' is hard to test ;-).
>

Aside from straight-up bugs, how can one of these functions fail? Is
memory allocation failure the only way? If so, the proposed
implementation (private references to pre-created singletons) ought to
guarantee that, to the exact extent that anything else can be
guaranteed.

(Or is that your point - that "never fail" is always "modulo bugs"?)

Incidentally, this guarantee, if implemented the obvious way, will
also mean that (), "", 0, etc are singletons. People talk casually
about the "empty tuple singleton", but I don't think it's actually
guaranteed anywhere.

ChrisA
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to