On 04/13/2016 09:58 AM, Brett Cannon wrote:> On Wed, 13 Apr 2016 at 09:19 Fred Drake wrote: >> I do the same, but... this is one of those cases where a caller will >> usually be passing a constant directly. If passed as a positional >> argument, it'll just be confusing ("what's True?" is my usual >> reaction to a Boolean positional argument). > > It would be keyword-only so this isn't even a possibility. > >> If passed as a keyword argument >> with a descriptive name, it'll be longer than I'd like to see: >> >> path_str = os.fspath(path, allow_bytes=True) > > I think the expectation that the number of people actually directly > calling this function with that argument specified is going to be > rather small, so the common-case will simply be: > > path_str = os.fspath(path) That is certainly my expectation. :) >> Names like os.fspath() and os.fssyspath() seem good to me. A single function is definitely my preference, but if that's not possible then I'm fine with that pair of names. -- ~Ethan~
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