[Python-Dev] When should pathlib stop being provisional?
Ethan Furman
ethan at stoneleaf.us
Wed Apr 6 00:35:57 EDT 2016
On 04/05/2016 07:40 PM, Steven D'Aprano wrote:
> On Tue, Apr 05, 2016 at 11:47:32PM +0000, Brett Cannon wrote:
>> To me it seems to basically be a question of whether people can be patient
>> during a transition and embrace pathlib over time or if they will simply
>> refuse to add support in libraries and refuse to use `getattr(path, 'path',
>> path)` or `str(path)` in the mean time.
>
> Wait, what? Is that what the whole fuss is about? That some people
> refuse to call str(path) when passing a path object to a function that
> expects a string?
No, Stephen, that is not what this is about. This is about the ugliness
of code with str(path) this and str(path) that and let's not forget the
Path(this_returned_string) and Path(that_returned_string), not to
mention the frustrations of forgetting to cast a str to Path or a Path
to str. It's about the horror of boiler-plate infecting our otherwise
beautiful Python code.
--
~Ethan~
More information about the Python-Dev
mailing list