The idea is okay, but I'm not keen about the syntax, because it
doesn't read well as English. Currently "def" can be read as
the verb "define", but "return define" doesn't make sense.

Maybe it would be better as a pseudo-decorator:

    @return
    def f(args):
        ...

But I'm inclined to agree with Guido that this isn't a frequent
enough thing to warrant special syntax.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to