On Wed, May 24, 2017 at 12:18 AM, Serhiy Storchaka <storch...@gmail.com> wrote: > It seems to me that the purpose of this proposition is not performance, but > the possibility to use __fspath__ in str or bytes subclasses. Currently > defining __fspath__ in str or bytes subclasses doesn't have any effect. > > I don't know a reasonable use case for this feature. The __fspath__ method > of str or bytes subclasses returning something not equivalent to self looks > confusing to me.
Yes, that would be another reason. Only when Python drops support for strings as paths, can people start writing such subclasses. I'm sure many would now say dropping str/bytes path support won't even happen in Python 4. -- Koos -- + Koos Zevenhoven + http://twitter.com/k7hoven + _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/