[Python-Dev] pathlib (was: Defining a path protocol) (original) (raw)

Jim J. Jewett jimjjewett at gmail.com
Thu Apr 7 10:25:43 EDT 2016


(1) I think the "built-in" should instead be a module-level function in the pathlib. If you aren't already expecting pathlib paths, then you're just expecting strings to work anyhow, and a builtin isn't likely to be helpful.

(2) I prefer that the function be explicit about the fact that it is downcasting the representation to a string. e.g., pathlib.path_as_string(my_path)

But if the final result is ospath or fspath or ... I won't fight too hard, particularly since the output may be a bytestring rather than a str.

-jJ



More information about the Python-Dev mailing list