[Python-ideas] Syntax: 'return: ...' expressions

Yawar Amin yawar.amin at gmail.com
Thu Jan 8 02:05:13 CET 2015


On 2015-01-07 11:20, Yawar Amin wrote:
> On 2015-01-07, at 2:11, Andrew Barnert <abarnert at yahoo.com> wrote:
>> [...]

>> That's the key. A function is a way to wrap a sequence of statements
>> (the function body) so it can be used in an expression (a function
>> call). Because JavaScript lets you define functions (with full
>> statement syntax) in expressions, that gives you a way to "demote" an
>> expression inline, while Python can only do so out-of-line. At the
>> core, this is what all of the multiline lambda attempts and similar
>> proposals are trying to accomplish.
>
> Thanks. This has given me an idea that's on a slightly different
> tangent than this one. Will write it up (this time with some actual
> runnable code) when I get home tonight.

As promised, a write-up of my idea:
http://yawar.blogspot.ca/2015/01/expressive-functional-programming-with.html

I have a feeling that some Pythoneers will really hate it, but hey, what
can you do :-)

Regards,

Yawar


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150107/f2cd2184/attachment.sig>


More information about the Python-ideas mailing list