Message285647
In case it is helpful, here's my list of examples where the AC and existing signature objects are insufficiently expressive:
type(obj)
type(name, bases, mapping)
two different signatures depending on type
range(stop)
range(start, stop)
range(start, stop, step)
dict.pop(key[, default])
default of None has different meaning than missing default
which raises KeyError when the key is missing
itertools.permutations(iterable[, r])
where the absence of *r* implies r=len(iterable)
bisect.bisect_right(a, x[, lo[, hi]]) -> index
where the absence of *hi* implies hi=len(a)
min(iterable, *[, default=obj, key=func]) -> value
min(arg1, arg2, *args, *[, key=func]) -> value
has two signatures depending on the number of
positional arguments and a keyword argument
only used in the first signature. It's implementation
is also shared with max().
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
def sumseq(seq, a=0, b=None):
# Pure python code with nullable int
if b is None:
b = len(seq)
return sum(seq[a:b]) |
|
Date |
User |
Action |
Args |
2017-01-17 15:03:03 | rhettinger | set | recipients:
+ rhettinger, ncoghlan, larry, methane, meador.inge, zach.ware, serhiy.storchaka |
2017-01-17 15:03:03 | rhettinger | set | messageid: <1484665383.47.0.580618630565.issue20291@psf.upfronthosting.co.za> |
2017-01-17 15:03:03 | rhettinger | link | issue20291 messages |
2017-01-17 15:03:03 | rhettinger | create | |
|