On Fri, 17 Feb 2017 at 10:23 Stephan Houben wrote:
> Proposal: Light-weight call-by-name syntax in Python
>
> The following syntax
> a : b
> is to be interpreted as:
> a(lambda: b)
>
> Effectively, this gives a "light-weight macro system" to Python,
> since it allows with little syn
2017-02-18 11:55 GMT+01:00 Nathaniel Smith :
>
> This is also potentially a downside, though... the macro-call proposal
> not only handles the cases you're worrying about, but also handles a
> bunch of cases that are basically impossible to handle in Python right
> now. OTOH all the cases where yo
On Fri, Feb 17, 2017 at 2:46 AM, Stephan Houben wrote:
> Hi Nathaniel,
>
>
> 2017-02-17 11:28 GMT+01:00 Nathaniel Smith :
>>
>> Note that this is definitely a different proposal from the original,
>> since the original proposer's goal was to be able to use this with
>> existing, unmodified functio
Hi Erik,
I have changed my proposal to the alternative syntax
a:: b
(Note my preferred spacing.
This is to make it read like some annoation applied to the expression,
like
delayed:: expensive_function()+1
)
Since :: is a binary operator, we need to think about
associativity.
My conservative
On 17/02/17 10:22, Stephan Houben wrote:
Proposal: Light-weight call-by-name syntax in Python
The following syntax
a : b
is to be interpreted as:
a(lambda: b)
Isn't this too general a syntax? Doesn't it lead to something like:
if a: b: c: d: e: pass
E.
_
Hi Nathaniel,
2017-02-17 11:28 GMT+01:00 Nathaniel Smith :
>
> Note that this is definitely a different proposal from the original,
> since the original proposer's goal was to be able to use this with
> existing, unmodified functions that expect a regular value, not a
> lambda.
>
> I don't really
On Fri, Feb 17, 2017 at 2:22 AM, Stephan Houben wrote:
> Proposal: Light-weight call-by-name syntax in Python
>
> The following syntax
> a : b
> is to be interpreted as:
> a(lambda: b)
>
> Effectively, this gives a "light-weight macro system" to Python,
> since it allows with little
Proposal: Light-weight call-by-name syntax in Python
The following syntax
a : b
is to be interpreted as:
a(lambda: b)
Effectively, this gives a "light-weight macro system" to Python,
since it allows with little syntax to indicate that the argument to
a function is not to be immediat