Hacker News new | past | comments | ask | show | jobs | submit login

Never gonna happen. As GvR said, 'with' already means something completely different.

Besides, it's not the Python style to have function calls without the () syntax.

I think you could do something interesting with decorators, though.




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.


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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: