[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ideas
Subject:    [Python-ideas] Re: Typing Callable Ellipsis -- support for type hints a la Callable[[int, float, ...
From:       Guido van Rossum <guido () python ! org>
Date:       2021-09-22 17:23:18
Message-ID: CAP7+vJLM-O+bcs+hp-eGkNqvXKVkmn_hj=J2j3T+U_rsVpXavQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


This is a question for typing-sig.

Over on typing-sig we are looking at alternatives to Callable, so it's
unlikely that any changes to Callable itself will be accepted.

Instead of `...`, we will probably use `*args`, similar to what is used in
the `def` syntax.

Feel free to peruse the typing-sig archives to learn more about the current
status:
https://mail.python.org/archives/list/typing-sig@python.org/

--Guido

On Wed, Sep 22, 2021 at 1:04 AM Randolf Scholz <randolf.scholz@gmail.com>
wrote:

> @Valentin Berlier
>
> That would probably be possible, but the question here is, given that
> `Callable` is a built-in, is it sensible to expect `Callable` to support
> this behaviour.
>
> I would say yes, because it is extremely intuitive, especially with
> regards to the fact that the widely used numpy library already uses
> Ellipsis in a fashion semantically consistent with this proposal.
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-leave@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/L6BTMIIMNSXX37YQA7J5VCOI7TOKOX5O/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>

[Attachment #5 (text/html)]

<div dir="ltr"><div>This is a question for typing-sig.</div><div><br></div><div>Over \
on typing-sig we are looking at alternatives to Callable, so it&#39;s unlikely that \
any changes to Callable itself will be accepted.</div><div><br></div><div>Instead of \
`...`, we will probably use `*args`, similar to what is used in the `def` \
syntax.</div><div><br></div><div>Feel free to peruse the typing-sig archives to learn \
more about the current status:</div><div><a \
href="https://mail.python.org/archives/list/typing-sig@python.org/">https://mail.pytho \
n.org/archives/list/typing-sig@python.org/</a></div><div><br></div><div>--Guido<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 22, 2021 at 1:04 AM \
Randolf Scholz &lt;<a \
href="mailto:randolf.scholz@gmail.com">randolf.scholz@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">@Valentin Berlier<br> \
<br> That would probably be possible, but the question here is, given that `Callable` \
is a built-in, is it sensible to expect `Callable` to support this behaviour.<br> \
<br> I would say yes, because it is extremely intuitive, especially with regards to \
the fact that the widely used numpy library already uses Ellipsis in a fashion \
semantically consistent with this proposal.<br> \
_______________________________________________<br> Python-ideas mailing list -- <a \
href="mailto:python-ideas@python.org" target="_blank">python-ideas@python.org</a><br> \
To unsubscribe send an email to <a href="mailto:python-ideas-leave@python.org" \
target="_blank">python-ideas-leave@python.org</a><br> <a \
href="https://mail.python.org/mailman3/lists/python-ideas.python.org/" \
rel="noreferrer" target="_blank">https://mail.python.org/mailman3/lists/python-ideas.python.org/</a><br>
 Message archived at <a \
href="https://mail.python.org/archives/list/python-ideas@python.org/message/L6BTMIIMNSXX37YQA7J5VCOI7TOKOX5O/" \
rel="noreferrer" target="_blank">https://mail.python.org/archives/list/python-ideas@python.org/message/L6BTMIIMNSXX37YQA7J5VCOI7TOKOX5O/</a><br>
 Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" \
target="_blank">http://python.org/psf/codeofconduct/</a><br> </blockquote></div><br \
clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div \
dir="ltr"><div><div dir="ltr"><div>--Guido van Rossum (<a \
href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div><div><i \
style="font-family:Arial,Helvetica,sans-serif;font-size:small;font-weight:400;letter-s \
pacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal; \
word-spacing:0px;background-color:rgb(255,255,255);color:rgb(136,136,136)"><span>Pronouns</span>: \
he/him </i><a href="http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/" \
style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:small;fon \
t-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px; \
text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" \
target="_blank"><i>(why is my  <span>pronoun</span>  \
here?)</i></a></div></div></div></div></div>



_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/WE6MSPQNAKZIBNBJ3IN5MIKO6E7NIIV5/
 Code of Conduct: http://python.org/psf/codeofconduct/



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic