On 05/23/2013 01:10 PM, Ćukasz Langa wrote: > On 23 maj 2013, at 20:59, PJ Eby <pje at telecommunity.com> wrote: > >> As to the ability to do multiple types registration, you could support >> it only in type annotations, e.g.: >> >> @func.register >> def doit(foo: [int, float]): >> ... > > Initially I thought so, too. But it seems other people might think this > means "a sequence with the first element being an integer, and the second > a float". The BDFL seems to have yet a different idea: > > http://mail.python.org/pipermail/python-ideas/2012-December/018129.html > > This is clearly material for a separate PEP, wink wink, nudge nudge. > > To the point though. Based on this, and the fact PEP 8 currently disallows > annotations within the standard library, I came to the conclusion that > currently we should not include the annotation-driven form. > >> I generally lean towards returning the undecorated function, so that if you say: >> >> @func.register >> def do_int(foo: int): >> ... > > Me too. The PEP has been updated to specify that explicitly. So with this decision made, are there any open issues left? Or can we invite Guido back to the discussion? ;) -- ~Ethan~
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