On Sun, Mar 15, 2020 at 11:37:53PM -0400, Wes Turner wrote: > Monkeypatching the __str__ or __repr__ of a builtin is generally > undesirable because that's global and not thread safe.
Monkeypatching the __str__ or __repr__ of a builtin is generally impossible. py> int.__repr__ = lambda self: 'number' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't set attributes of built-in/extension type 'int' -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/OVL3F7QLYS6XBMGO7Y66USVZHHZ5A264/ Code of Conduct: http://python.org/psf/codeofconduct/