Re: [Python-Dev] summary: a Path protocol

2016-04-08 Thread Chris Angelico
On Fri, Apr 8, 2016 at 4:35 PM, Victor Stinner wrote: > Sorry, I don't have time to read the whole discussion. What is the problem > with adding a __str__ to pathlib? > > Victor Everything else has __str__ too, so you run the risk of open(["Hello", "World"], "w") working and doing something weird

Re: [Python-Dev] summary: a Path protocol

2016-04-07 Thread Victor Stinner
Sorry, I don't have time to read the whole discussion. What is the problem with adding a __str__ to pathlib? Victor ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.or

[Python-Dev] summary: a Path protocol

2016-04-07 Thread Ethan Furman
The discussion has ranged all over, so let me try to sum up: Name: __ospath__ Method or attribute? Method (implementations are of course free to pre-build and/or cache the value) Built-in? no, rather a function in pathlib - ospath() Add the method/attribute to str? Not necess