Am 09.10.2013 15:56, schrieb Larry Hastings: > On 10/09/2013 07:15 AM, Georg Brandl wrote: >> We have quite a large >> amount of C functions with positional-only parameters. Adding a "/" >> to each of those is a) a tedious task and b) probably not helpful for >> a lot of people: > > I volunteer to ensure that the "/"s are added if this PEP is accepted. (I > expect I'd do it myself, but who knows, maybe a volunteer would appear out of > the woodwork.) Yes, the much bigger concern is the second one. >> ... and the "undefined" singleton just smells wrong. Another way >> to spell "None" is just asking for trouble. > > It has to be a different value from "None", for the same reasons that all those > other different-spellings-for-None (e.g. inspect.Parameter.empty) exist. I know. Still, as a new builtin it will get used for all kinds of other purposes, especially when it has the name that other languages use for our None. Maybe you could get away with NotGiven or NotPassed (in parallel to NotImplemented). > I realize you are -1 on the proposal in general, but I'd be very interested if > you could propose an alternate approach where I didn't need "a new spelling for > None" as you put it. I think I would make Steven's proposed syntax mandatory: let the implementor of the function decide which value stands for "not given" -- just like we do in the C version, BTW. cheers, Georg
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