A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/038560.html below:

[Python-Dev] Efficient predicates for the standard library)

Keyword-only arguments (Re: [Python-Dev] Efficient predicates for the standard library)Just van Rossum just at letterror.com
Tue Oct 7 06:17:03 EDT 2003
Greg Ewing wrote:

> > >>>> def any(*iterables, pred=bool):
> > >
> > > ------------------------------------------------------------
> > >    File "<stdin>", line 1
> > >      def any(*iterables, pred=bool):
> > >                             ^
> > > SyntaxError: invalid syntax
> > 
> > Aieee! I was so sure you could do that, I didn't bother
> > checking
> 
> I was just thinking the other day that you *should* be
> able to say that. Any keyword arguments after a * arg
> would have to be specified by keyword in the call.

Same here. Here's another limitation I think is unneccesarary:

  >>> args = (1, 2, 3)
  >>> foo(*args, 4, 5, 6)
    File "<stdin>", line 1
      foo(*args, 4, 5, 6)
                 ^
  SyntaxError: invalid syntax
  >>> 

> So many PEP ideas, so little time...

You got that right...

Just

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4