For the specific case of `__file__`, yes, I think that would be too disruptive. This isn't a function that *consumes* a path -- it's a path that is consumed by innumerable other modules, most of which aren't under active maintenance, and a sizable fraction of those would break if this turned into a Path.
For other situations, you'd have to get specific -- I can't guess which ones particularly bug you. :-) On Thu, Aug 20, 2020 at 6:07 PM Christopher Barker <python...@gmail.com> wrote: > I really like pathlib. > > But for a while is was painful to use, 'cause there was som much code that > still used strings for paths. That was made a lot better when we introduced > the __fspath__ protocol, and then updated the standard library to use it > (everywhere?). > > But there are still a few that bug me. For instance: > > __file__ is a path represented as a string. It's not too big a deal to > wrap it in Path(), but it still annoys me. > > So: would it be entirely too disruptive to replace these kinds of things > with Path objects? > > -CHB > > > > > > -- > Christopher Barker, PhD > > Python Language Consulting > - Teaching > - Scientific Software Development > - Desktop GUI and Web Development > - wxPython, numpy, scipy, Cython > _______________________________________________ > 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/GIKHETWTXPG5CM54QV5RIHII57HUVMRM/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ 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/HHDI6ZBRSGT3REHF6EMZYUX3SP4XEZX7/ Code of Conduct: http://python.org/psf/codeofconduct/