News for hackers. Stuff that matters.
Re:Ruby-style Blocks in Python by russell on Sunday March 08, 2009 @03:39PM (#507452)
Ditto on that. The two uses of with have completely different meanings. The was an interesting discussion of the use of 'there' as a keyword that ferreted out a lot of issues: http://groups.google.com/group/comp.lang.python/browse_threa...

Sorry about the url. Tinyurl couldnt digest it. :-)

I think 'there' could have good traction, but nobody has made a PEP (see python.org). If a proposal doesnt have a champion, it isn't going anywhere.

Re:Ruby-style Blocks in Python by thristian on Monday March 09, 2009 @06:06AM (#508203)
I wish that thread had progressed to a more complete conclusion - I've been developing software with Twisted Python recently (a notoriously callback-heavy framework) and that syntax would clean up an awful lot of code in our code-base. In particular, I like that it's not a knee-jerk emulation of a particular syntax-feature of another language, but a general solution that works well for Ruby-style maps, defining property getters and setters, and setting up design-by-contract semantics.

I'd happily swap that syntax for some of the other features modern Python has grown, like the "with" statement, or decorators.