On Sun, Jul 19, 2020, at 13:02, Guido van Rossum wrote: > That looks expensive, esp. for objects implemented in Python — an extra > dict entry plus a new unique int object. What is the problem you are > trying to solve for these objects specifically? Just that the hex > numbers look distracting doesn’t strike me as sufficient motivation.
Could the numbers be kept outside the object, perhaps in a weak* dictionary that's maintained in the __repr__ method, so you don't pay for it if you don't use it? *if the object's hash/eq use identity, anyway... a "weak identity-keyed dictionary" might be a nice thing to add anyway _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/I34MYQDLIJNWEHV2JFO4QAKIZKCFTG7A/ Code of Conduct: http://python.org/psf/codeofconduct/