User loginNavigation |
PythonPython, metaprogramming, and macrosA nice blogpost from Ian Bicking. By Ehud Lamm at 2004-11-24 10:48 | Meta-Programming | Python | login or register to post comments | other blogs | 8150 reads
Release of Python 2.4, release candidate 1
What's New in Python 2.4 details the changes and additions in this release. Download the release here.
Most of the additions were discussed here in the past. Notable among them are generator expressions and function and method decorators.
Generic Functions have Landed (Python)
A semi-stable generic function API for Python.
Somewhere between CLOS style OOP and AOP, I'd say. I don't have the time to explore this, but other might wnat to give it a go and report their experience. Cache decorator in python 2.4Yet another simple example of decorators in Pyhton (via Daily Python-URL). By Ehud Lamm at 2004-10-28 20:16 | Python | login or register to post comments | other blogs | 6471 reads
A simple equation solver using attribute access and introspectionA nice hack which makes use of several language features to create a fun programming experience (or "user inteface" if you want). GvR: Rejecting the J2 decorators proposal
Yet another example of language design in action. The specific issues Guido is concerned about are perhaps of less importance than this concluding remark,
A warning: some people have shown examples of extreme uses of decorators. I've seen decorators proposed for argument and return type annotations, and even one that used a decorator to create an object that did a regular expression substitution. Those uses are cute, but I recommend being conservative when deciding between using a decorator or some other approach, especially in code that will see a large audience (like 3rd party library packages). Using decorators for type annotations in particular looks tedious, and this particular application is so important that I expect Python 3000 will have optional type declarations integrated into the argument list. Python DecoratorsA short and accessible explanation of decorators (new in Pyton 2.4). [via Keith] |
Browse archives
Active forum topics |
Recent comments
12 weeks 1 day ago
12 weeks 1 day ago
12 weeks 1 day ago
34 weeks 2 days ago
38 weeks 4 days ago
40 weeks 2 days ago
40 weeks 2 days ago
42 weeks 6 days ago
47 weeks 4 days ago
47 weeks 4 days ago