
31 Mar
2016
31 Mar
'16
2:09 a.m.
On 30.03.2016 18:49, Ethan Furman wrote:
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.
I have bad memories about this kind of approach. It reminds me of the peculiarity of os(.path)-related functions in Python 2 that return either bytes or unicode depending on the argument's type.
That's utterly confusing and I remember us hunting bugs related to this for hours (basically looking for "where does this byte string come from?").
Best, Sven