On Tue, Dec 20, 2022 at 11:55:49PM -0800, Jeremiah Paige wrote: > @property > def data(self): > return f"{self}"
By my testing, on Python 3.10, this is slightly faster still: @property def data(self): return "".join((self,)) That's about 14% faster than the f-string version. _______________________________________________ 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/CCZG6ALFEV3B67LENW5ZDJG5XSHKREG4/ Code of Conduct: http://python.org/psf/codeofconduct/