Steven Bethard wrote:
> [Steven Bethard]
>> It would be really nice in the example above to mark ``self`` in
>> ``__call__`` as a positional only argument.
>
> [Nick Coghlan]
>> However, I'm also wondering if we need an actual syntax, or if a simple
>> convention would do the trick: start the name
Aahz <[EMAIL PROTECTED]> wrote:
>
> On Mon, Aug 14, 2006, Guido van Rossum wrote:
> > On 8/14/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> >>
> >> However, I'm also wondering if we need an actual syntax, or if a simple
> >> convention would do the trick: start the names of positional-only argume
On Mon, Aug 14, 2006, Guido van Rossum wrote:
> On 8/14/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>>
>> However, I'm also wondering if we need an actual syntax, or if a simple
>> convention would do the trick: start the names of positional-only arguments
>> with an underscore.
>
> Hm... and perh
[Steven Bethard]
> It would be really nice in the example above to mark ``self`` in
> ``__call__`` as a positional only argument.
[Nick Coghlan]
> However, I'm also wondering if we need an actual syntax, or if a simple
> convention would do the trick: start the names of positional-only arguments
>
On 8/14/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> However, I'm also wondering if we need an actual syntax, or if a simple
> convention would do the trick: start the names of positional-only arguments
> with an underscore.
Hm... and perhaps we could forbid keyword arguments starting with an
und
Guido van Rossum wrote:
>> It would be really nice in the example above to mark ``self`` in
>> ``__call__`` as a positional only argument.
>
> But this is a rather unusual use case isn't it? It's due to the bound
> methods machinery. Do you have other use cases? I would assume that
> normally such
On 8/14/06, Jim Jewett <[EMAIL PROTECTED]> wrote:
> On 8/14/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > I believe the PEP doesn't address the opposite use case: positional
> > > arguments that should *not* be specified as keyword a
On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 8/14/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > I believe the PEP doesn't address the opposite use case: positional
> > > arguments that should *not* be specified as key
On 8/14/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > I believe the PEP doesn't address the opposite use case: positional
> > arguments that should *not* be specified as keyword arguments.
...
> It would be really nice in the example ab
On 8/14/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > I believe the PEP doesn't address the opposite use case: positional
> > arguments that should *not* be specified as keyword arguments. For
> > example, I might want to write
> >
> >
On 8/14/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> I believe the PEP doesn't address the opposite use case: positional
> arguments that should *not* be specified as keyword arguments. For
> example, I might want to write
>
> def foo(a, b): ...
>
> but I don't want callers to be able to cal
Not remembering the PEP in detail, I agree with Jim's resolution of all these.
I guess the right rule is that all positional arguments come first
(first the regular ones, then * or *args). Then come the keyword
arguments, again, first the regular ones (name=value), then **kwds.
I believe the PEP
On 8/11/06, Jiwon Seo <[EMAIL PROTECTED]> wrote:
> When we have keyword-only arguments, do we allow 'keyword dictionary'
> argument? If that's the case, where would we want to place
> keyword-only arguments?
> Are we going to allow any of followings?
> 1. def foo(a, b, *, key1=None, key2=None, *
When we have keyword-only arguments, do we allow 'keyword dictionary'
argument? If that's the case, where would we want to place
keyword-only arguments?
Are we going to allow any of followings?
1. def foo(a, b, *, key1=None, key2=None, **map)
2. def foo(a, b, *, **map, key1=None, key2=None)
3.
14 matches
Mail list logo