[Python-Dev] Partial function application 'from the right'

Antoine Pitrou solipsis at pitrou.net
Thu Jan 29 23:04:41 CET 2009

Alexander Belopolsky <alexander.belopolsky <at> gmail.com> writes:
> By this analogy, partial(f, ..., *args) is right_partial with '...'
> standing for any number of missing arguments.  I you want to specify
> exactly one missing argument, you would want to write partial(f, :,
> *args), which is not a valid syntax even in Py3.

Yes, of course, but... the meaning which numpy attributes to Ellipsis does not
have to be the same in other libraries. Otherwise this meaning would have been
embedded in the interpreter itself, while it hasn't.

The point of using Ellipsis in this case is not to be numpy-friendly, but rather
to exploit the fact that it is a very rarely used object, and that it has an
alternate spelling which suits very well (visually speaking) the purpose being



More information about the Python-Dev mailing list