Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 5:26 PM, Guido van Rossum wrote: > I am accepting the PEP. Congrats Yuri! (And others who feel they deserve it. > :-) Great! Larry will merge the implementation then. Larry, Brett and I worked on the PEP together (~200 emails in private discussions), so everybody deserves ;)

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
I am accepting the PEP. Congrats Yuri! (And others who feel they deserve it. :-) On Fri, Jun 22, 2012 at 2:04 PM, Yury Selivanov wrote: > On 2012-06-22, at 4:58 PM, Ethan Furman wrote: >> That looks strange to me -- I suggest putting brackets around each one, like: >> >>   replace(*, [name=,] [ki

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 4:58 PM, Ethan Furman wrote: > That looks strange to me -- I suggest putting brackets around each one, like: > > replace(*, [name=,] [kind=,] [default=,] > [annotation=]) -> Parameter Isn't it too much? The PEP clearly indicates '=' is just a notation for an optional paramet

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Ethan Furman
Yury Selivanov wrote: On 2012-06-22, at 3:47 PM, Ethan Furman wrote: Guido van Rossum wrote: On Fri, Jun 22, 2012 at 12:24 PM, Yury Selivanov wrote: On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov wrote: Yes, I meant optional. Would 'n

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 3:25 PM, Christian Heimes wrote: > Am 22.06.2012 21:10, schrieb Yury Selivanov: >> I think that if a function lacks an annotation, that should be reflected >> in the same way for its signature. >> >> Currently: >> >>if hasattr(signature, 'return_annotation'): >> >> If we u

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 4:20 PM, Terry Reedy wrote: > On 6/22/2012 3:24 PM, Yury Selivanov wrote: >> On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: > >>> Hardly, because that's not valid syntax. I'd write name(arg1, *, >>> arg2=). >> >> Like >> >> replace(*, name=, kind=, default=, >>

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Terry Reedy
On 6/22/2012 3:24 PM, Yury Selivanov wrote: On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: Hardly, because that's not valid syntax. I'd write name(arg1, *, arg2=). Like replace(*, name=, kind=, default=, annotation=) -> Parameter or replace

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: > On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov > wrote: >> Guido, >> >> On 2012-06-22, at 2:52 PM, Guido van Rossum wrote: >>> Of these, only (1) is a blocker for PEP acceptance -- I'd either like >>> to see this defended vigorously (maybe i

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 3:47 PM, Ethan Furman wrote: > Guido van Rossum wrote: >> On Fri, Jun 22, 2012 at 12:24 PM, Yury Selivanov >> wrote: >>> On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: >>> On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov wrote: > Yes, I meant optional. Would

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Christian Heimes
Am 22.06.2012 21:32, schrieb Larry Hastings: > > On 06/22/2012 12:21 PM, Christian Heimes wrote: >> The PEP is already complex enough and went to several incarnations. It >> was a wise decision to focus on the features that could be implemented >> before the first beta is released. Kudos for pulli

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Ethan Furman
Guido van Rossum wrote: On Fri, Jun 22, 2012 at 12:24 PM, Yury Selivanov wrote: On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov wrote: Yes, I meant optional. Would 'name(arg1, *, [arg2])' be better? Hardly, because that's not valid synta

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Larry Hastings
On 06/22/2012 12:21 PM, Christian Heimes wrote: The PEP is already complex enough and went to several incarnations. It was a wise decision to focus on the features that could be implemented before the first beta is released. Kudos for pulling it off, Larry! Guys, guys! I have done next-to-not

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
On Fri, Jun 22, 2012 at 12:24 PM, Yury Selivanov wrote: > On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: > >> On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov >> wrote: >>> Guido, >>> >>> On 2012-06-22, at 2:52 PM, Guido van Rossum wrote: > ... >>> 'empty' will also work.  When python-dev col

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Christian Heimes
Am 22.06.2012 21:10, schrieb Yury Selivanov: > I think that if a function lacks an annotation, that should be reflected > in the same way for its signature. > > Currently: > > if hasattr(signature, 'return_annotation'): > > If we use Signature.empty: > > if signature.return_annotation i

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
On Fri, Jun 22, 2012 at 12:21 PM, Christian Heimes wrote: > Am 22.06.2012 20:52, schrieb Guido van Rossum: >> (5) Too bad there's no proposal for adding signatures to builtin >> functions/methods, but understood. > > Larry et al. did an experiment with a mutable __signature__ attribute to > PyCFun

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: > On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov > wrote: >> Guido, >> >> On 2012-06-22, at 2:52 PM, Guido van Rossum wrote: ... >> 'empty' will also work. When python-dev collectively decided to >> go with missing attributes, 'empty' didn't

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Christian Heimes
Am 22.06.2012 20:52, schrieb Guido van Rossum: > (5) Too bad there's no proposal for adding signatures to builtin > functions/methods, but understood. Larry et al. did an experiment with a mutable __signature__ attribute to PyCFunction. He immediately backed out and removed the attribute as I expl

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
On Fri, Jun 22, 2012 at 12:10 PM, Yury Selivanov wrote: > Guido, > > On 2012-06-22, at 2:52 PM, Guido van Rossum wrote: > >> This looks great, much better than the version I reviewed half a year >> ago! Thanks you and others (especially Yuri) for all your efforts in >> guiding the discussion and i

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Yury Selivanov
Guido, On 2012-06-22, at 2:52 PM, Guido van Rossum wrote: > This looks great, much better than the version I reviewed half a year > ago! Thanks you and others (especially Yuri) for all your efforts in > guiding the discussion and implementing as the discussion went along; > also thanks to Nick fo

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
This looks great, much better than the version I reviewed half a year ago! Thanks you and others (especially Yuri) for all your efforts in guiding the discussion and implementing as the discussion went along; also thanks to Nick for participating to intensely. Quick review notes: (1) I don't like

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Guido van Rossum
I'll review it right now. On Fri, Jun 22, 2012 at 11:31 AM, Larry Hastings wrote: > > > Here's PEP 362: > > http://www.python.org/dev/peps/pep-0362/ > > It adds easy introspection abilities to Python callables.  After a whirlwind > of activity over the past several weeks we think it's ready. > >

[Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Larry Hastings
Here's PEP 362: http://www.python.org/dev/peps/pep-0362/ It adds easy introspection abilities to Python callables. After a whirlwind of activity over the past several weeks we think it's ready. All it needs now is an official pronouncement from some seasoned veteran of the Python commu