I totally agree with Matthew.
I don't understand the code at first sight.
The "with ... do ..." syntax breaks the
"Python is executable pseudo-code" pattern.
And according the example given at Tav's web site:
with employees.select do (emp):
if emp.salary > developer.salary:
return fire
On Sun, Mar 8, 2009 at 8:13 AM, tav wrote:
> Apologies for bringing up an old issue, but I think I've worked out a
> Pythonic syntax for doing Ruby-style blocks.
As a point of order, please move this discussion to python-ideas,
where it belongs roughly until the time a PEP might be ready for
appr
On 8 Mar 2009, at 15:13, tav wrote:
Apologies for bringing up an old issue, but I think I've worked out a
Pythonic syntax for doing Ruby-style blocks. The short of it is:
with employees.select do (emp):
if emp.salary > developer.salary:
return fireEmployee(emp)
else
tav espians.com> writes:
>
> Apologies for bringing up an old issue, but I think I've worked out a
> Pythonic syntax for doing Ruby-style blocks. The short of it is:
> [...]
This thread should probably be redirected to python-ideas.
Regards
Antoine.
__
tav wrote:
> I explain in detail in this blog article:
>
> http://tav.espians.com/ruby-style-blocks-in-python.html
>
"This is also possible in Python but at the needless cost of naming and
defining a function first"
The cost of defining the function first is probably much less than the cos