[Python-ideas] except expression

Steven D'Aprano steve at pearwood.info
Fri Feb 21 01:10:05 CET 2014


On Wed, Feb 19, 2014 at 10:55:58PM -0500, Yury Selivanov wrote:
> 
> On 2/19/2014, 8:18 PM, Chris Angelico wrote:
> >Advantages of the arrow include ->
> I would refrain from introducing a new operator here,
> especially '->'.

It's not new. It's used in annotations:

py> def func(a, b) -> "Return result":
...     return "something"
...
py> func.__annotations__
{'return': 'Return result'}


-- 
Steven


More information about the Python-ideas mailing list