[Types-sig] Keyword arg declarations

Tim Peters tim_one@email.msn.com
Mon, 20 Dec 1999 01:15:50 -0500


>>      range([start,] stop[, step])
>>
>> This is, that's just the way the *doc* is written, to make it
>> clearer.

[DavidA]
> I know that.  However, I can imagine that it will be hard to
> justify to the unwashed masses why they need to use seemingly
> unrelated syntax to describe the signature for humans and the
> signature for the compiler.

How would that need arise?  Signatures for the builtins will come with the
system.  If an unwashed mass is clever enough to document their own function
in a way that doesn't reflect the way they implemented it, they already
understand the two points of view fine.

I think there's more potential for confusion from automated tools (like
IDLE's calltips) that dig out the actual signature instead of the documented
one; e.g., for randrange, calltips pops up

    (start, stop=None, step=1, int=<built-in function int>,
     default=None)

> I believe that you raise a similar point in another of your
> posts, w.r.t the 'int=int, ord=ord' extra junk in your function
> definition.

Yes; I'm wondering whether it's possible (or wise, or something) to *lie*
about the true signature.

> That said, I suspect that the issue is peripheral and rare enough
> that I needn't worry.

I agree; but if you do want to worry, think about calltips too <wink>.

it's-the-end-users-i'm-not-worried-about-ly y'rs  - tim