[Python-ideas] Ruby-style Blocks in Python Idea

Sturla Molden sturla at molden.no
Mon Mar 9 17:09:02 CET 2009

On 3/9/2009 4:53 PM, tav wrote:

> I spent considerable effort to make the using/do statement as Pythonic
> as possible.
> Could you please elaborate on what you don't like about it?
> Please note that the lambda thing was Sturla's follow up comment...

If I can elaborate as well. There are three things I don't like:

1. You are introducing two new keywords. Solving problems by constantly 
adding new syntax is how programming languages are designed in Redmond, 
WA. I don't exactly know what Pythonic means, but bloating the syntax is 

2. Most of this is covered by 'def'. Python allows functions to be 
nested. Python does support closures.

3. Anonymous classes in Java have more cases for abuse than use. Just 
see how they are abused to write callbacks/handlers. They are a 
notorious source of unreadable and unmaintainable spaghetti code.


More information about the Python-ideas mailing list