Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-21 Thread Nick Coghlan
On 21 Jan 2014 13:49, "Larry Hastings" wrote: > > On 01/20/2014 03:53 PM, Nick Coghlan wrote: >> >> Please turn the question around and look at it with your release manager hat on rather than your creator of Argument Clinic hat: if I came to you and said I wanted to add a new public API to the ins

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Larry Hastings
On 01/20/2014 03:53 PM, Nick Coghlan wrote: Please turn the question around and look at it with your release manager hat on rather than your creator of Argument Clinic hat: if I came to you and said I wanted to add a new public API to the inspect module after the second beta release, what wou

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Nick Coghlan
On 21 Jan 2014 09:26, "Larry Hastings" wrote: > > > > On 01/20/2014 04:59 AM, Nick Coghlan wrote: >> >> When I wrote that, I was thinking we had made >> inspect.Signature.__repr__ produce a nice string format, but then I >> noticed in the REPL today that we never got around to doing that - I >> th

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Larry Hastings
On 01/20/2014 04:59 AM, Nick Coghlan wrote: When I wrote that, I was thinking we had made inspect.Signature.__repr__ produce a nice string format, but then I noticed in the REPL today that we never got around to doing that - I think because we didn't know how to handle positional-only arguments

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Nick Coghlan
On 21 Jan 2014 06:26, "Terry Reedy" wrote: > > On 1/20/2014 7:59 AM, Nick Coghlan wrote: > >> However, while I know you're keen to finally make introspection work >> for all C level callables in 3.4, even the ones with signatures that >> can't be expressed as Python function signatures, I'd like t

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Terry Reedy
On 1/20/2014 7:59 AM, Nick Coghlan wrote: However, while I know you're keen to finally make introspection work for all C level callables in 3.4, even the ones with signatures that can't be expressed as Python function signatures, I'd like to strongly encourage you to hold off on that last part u

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Yury Selivanov
Larry, Nick, On January 20, 2014 at 8:00:35 AM, Nick Coghlan (ncogh...@gmail.com) wrote: > > Your proposal gets a "no, absolutely not" vote from me. > > 1. We already have a notion of "optional parameters". Parameters > with default values are optional. > 2. Your proposed syntax doesn't mentio

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Nick Coghlan
On 20 January 2014 20:16, Larry Hastings wrote: > > > On 01/19/2014 08:30 PM, Nick Coghlan wrote: > > Guido, Larry and I thrashed out the required semantics for parameter groups > at PyCon US last year (and I believe the argument clinic PEP describes those > accurately). > > They're mainly needed

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-20 Thread Larry Hastings
On 01/19/2014 08:30 PM, Nick Coghlan wrote: Guido, Larry and I thrashed out the required semantics for parameter groups at PyCon US last year (and I believe the argument clinic PEP describes those accurately). They're mainly needed to represent oddball signatures like range() and slice().

Re: [Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-19 Thread Nick Coghlan
Guido, Larry and I thrashed out the required semantics for parameter groups at PyCon US last year (and I believe the argument clinic PEP describes those accurately). They're mainly needed to represent oddball signatures like range() and slice(). However, I'm inclined to say that the affected func

[Python-Dev] signature.object, argument clinic and grouped parameters

2014-01-19 Thread Yury Selivanov
In the midst of work on the issue #17481, it became apparent that we need  a way of specifying optional/grouped parameters. One good example of grouped parameters in python is the `type` function. Basically, it has two different signatures: * type(name, bases, dict) * type(object) Which we can