On 04/14/2016 05:20 PM, Stephen J. Turnbull wrote: > However, the proposed polymorphism does create ambiguity and risk for > my uses. I rarely have the luxury of *not* ensuring paths are text, > regardless of the bytes-ness of the underlying application, because I > can be pretty darn sure that somebody's going to feed me non- > filesystem encodings, and soon. Even when I am working with bytes > representing paths in the filesystem encoding, I need to convert to > text to read the darn things when debugging! So I don't consent; > you'll have to impose it on me. Hmm. Well, the good news is you have convinced me that letting bytes through willy-nilly is akin to loosing the hounds of hell on our code. The bad news is I was never in that camp. ;) The camp I'm in is a function* that, be default, will raise if bytes enters the picture -- but will allow them through if the user specifically says they are okay with getting bytes. Would that work for you? -- ~Ethan~ *Or pair of functions, one that is str-only, one that allows both -- but I'd rather just have one function with a flag.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4