On Thu, Mar 31, 2016 at 12:46 PM, Sven R. Kunze email@example.com wrote:
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.
True. When we do have the answer, we need to let people know about it.
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.
While discussing, pondering and experimenting with this, I have formed a quite clear view on how I think we should move forward with this. I'm working on a proposal that attempts to not be in conflict with any of the goals. I hope it is not in conflict with your present thoughts about structured/vs monolithic objects either :)
"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.