[Python-ideas] Working with Path objects: p-strings?
Sven R. Kunze
srkunze at mail.de
Thu Mar 31 05:46:38 EDT 2016
On 31.03.2016 11:15, Paul Moore wrote:
> Any suggestions for a better design? It might be nice for someone to
> write a blog entry or posting somewhere on "how to upgrade your 3rd
> party library to support pathlib" and one of the harder questions will
> be "how do I decide whether to return a string or a path?" If we had a
> good recommendation for this, it might help adoption.
Good point. This discussion has been long already so it might make sense
to write something down in a concise manner.
I am not sure if I can make a good suggestion here because I am still
trapped at the point where I need to sort out if a path more like a dict
or another structured datatype, or if it is more a monolithic object.
That will be the next blog post topic for me.
"how do I decide whether to return a string or a path?" << very good
question btw; my initial thought would be; make two functions (maybe the
same name in two different namespaces), so it's crystal clear what this
function takes a arguments and what it returns. But I need to think more
about this.
Best,
Sven
More information about the Python-ideas
mailing list