On 20Nov2017 10:49, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
Cameron Simpson wrote:
Unless one had a misfortune and wanted another docstring.
Good point. I guess having differing docstrings should make
otherwise equal objects ineligible for merging.
[...example...]
I think setting the docstring of an existing immutable object
would have to be disallowed -- you need to create a new object
if you want it to have a distinct docstring, e.g.
MAX_BUFSIZE = int(8192, __doc__ = 'Size of the hardware buffer used
for I/O on this device.')
Which is painful and elaborate. In my original post I had written:
Now, I accept that the "CPython coaleases some values to shared singletons"
thing is an issue, but the language doesn't require it, and one could change
implementations such that applying a docstring to an object _removed_ it from
the magic-shared-singleton pool, avoiding conflicts with other uses of the
same value by coincidence.
hoping for automatic arrangement of that.
Cheers,
Cameron Simpson <c...@cskk.id.au> (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list