[Python-Dev] When should pathlib stop being provisional?
Alexander Walters
tritium-list at sdamon.com
Tue Apr 5 23:06:36 EDT 2016
On 4/5/2016 22:44, Nick Coghlan wrote:
> Option 4: define a rich-object-to-text path serialisation convention,
> as paths are not conceptually the same as arbitrary strings
Just as a nit to pick, it is perfectly acceptable for hypothetical path
objects to raise when someone tries to shoehorn them into acting like
arbitrary strings - open() will gladly halt and set fire if you try and
pass the text of war and peace as an argument.
I think the naysayers would be satisfied with an object that... while
not str or bytes or a derived class of either... acted like str when it
had to. Is that possible without deriving from str or bytes?
More information about the Python-Dev
mailing list