Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-23 Thread Marko Rauhamaa
Dan Stromberg drsali...@gmail.com: Please don't add multiline lambdas to Python. Agree. Multiline lambdas give rise (in a big way) to the computer-language-equivalent of run-on sentences. Lambdas are perfect in Scheme because they are idiomatic in it. They carry a visual meaning and flow

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-23 Thread Steven D'Aprano
Travis Griggs wrote: I do not like the python lambda. For two reasons. One: In a language that sought to be approachable by simple people (i.e. non computer science graduates who would use it in addition to their scientific/education background), I can’t believe they threw in a 6 character

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-22 Thread Travis Griggs
On Aug 21, 2014, at 12:55 AM, icefap...@gmail.com wrote: Hi, just wanting to do a shot in the dark,but maybe this syntax is Pythonic (in a we-are-all-grown-ups fashion, ahem)enough to get its way into the language this is what yours truly thinks: don't we all know that : means the next

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-22 Thread Dan Stromberg
On Thu, Aug 21, 2014 at 12:55 AM, icefap...@gmail.com wrote: Hi, just wanting to do a shot in the dark,but maybe this syntax is Pythonic (in a we-are-all-grown-ups fashion, ahem)enough to get its way into the language this is what yours truly thinks: don't we all know that : means the next

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-22 Thread Dan Stromberg
On Thu, Aug 21, 2014 at 12:55 AM, icefap...@gmail.com wrote: Hi, just wanting to do a shot in the dark,but maybe this syntax is Pythonic (in a we-are-all-grown-ups fashion, ahem)enough to get its way into the language this is what yours truly thinks: don't we all know that : means the next

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Chris Angelico
Ah, here we go again! It's multi-line lambda season. Comes around as regularly as duck-typing season, rabbit seasoning, baseball season, and other Looney Tunes references. :) On Thu, Aug 21, 2014 at 5:55 PM, icefap...@gmail.com wrote: doFunc(def(): print( anon ) return gvr) What I'm

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
reasonable, but I don't like the close parens on the same line; even if this syntax is allowed, I'd frown on it in style guides, thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Chris Angelico
On Thu, Aug 21, 2014 at 6:59 PM, icefap...@gmail.com wrote: thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because the ( contents are space-insensitive: this would be a syntax error: a

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
reasonable, but I don't like the close parens on the same line; even if this syntax is allowed, I'd frown on it in style guides, thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions -- https://mail.python.org/mailman/listinfo/python-list

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Marko Rauhamaa
icefap...@gmail.com: it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions In practice, your proposal would not make life easier for Python programmers. Marko --

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
tag_handler = { span: lambda content: content, div: lambda content: \n+content+\n, p: lambda content: \n+content+\n, br: lambda content: \n, } If you wanted to expand one of those to have statements in it, you'd have to take it out-of-line and break the

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
On Thursday, August 21, 2014 2:27:08 AM UTC-7, Marko Rauhamaa wrote: In practice, your proposal would not make life easier for Python programmers. Marko neither did the lambda, yours truly supposes? -- https://mail.python.org/mailman/listinfo/python-list

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Terry Reedy
On 8/21/2014 5:14 AM, icefap...@gmail.com wrote: it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions I have, multiple time in previous threads. A bad idea. Unnecessary.

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread alex23
On 21/08/2014 7:30 PM, icefap...@gmail.com wrote: On Thursday, August 21, 2014 2:27:08 AM UTC-7, Marko Rauhamaa wrote: In practice, your proposal would not make life easier for Python programmers. neither did the lambda, yours truly supposes? alex23 disagrees. alex23 finds the lambda