
30 Mar
2016
30 Mar
'16
9:49 a.m.
On 03/30/2016 08:18 AM, Paul Moore wrote:
And of course code that has to deal with *both* Path and string objects (for compatibility reasons) can easily enough handle anything it receives, but has a decision to make about what to return - if it returns Path objects, it won't be backward compatible. But if it returns string objects, we'll never get away from the need to convert strings to paths in our code at some point.
A solution here is to return what you receive:
- str coming in? str going out - path coming in? path going out
Of course, this gets muddied when multiple path/str arguments are accepted coming in.
-- ~Ethan~