Learning Python advanced features

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Aug 28 13:48:07 CEST 2009

Jonathan Gardner a écrit :
> On Aug 27, 5:13 am, jvpic <jv... at free.fr> wrote:
>> Hi,
>> Learning Python, I understand the mechanism of : closure, __new__,
>> descriptors, decorators and __metaclass__, but I interrogate myself on
>> the interest of those technics ?
>> May somebody explain me the interest ?
> I assume you are asking, "Why do these features exist? What makes them
> useful? When would I use them?"
> For that, you should re-read the documentation and discussion
> surrounding them. The short answer is that the above makes your job,
> as a programmer easier. It's easier because you have to write less
> code, read less code, and your code has fewer bugs.

I think the OP is mostly looking for practical use cases. FWIW, when I 
discovered Python's "lambda" (I only knew a couple low-level imperative 
languages by that time), I really wondered what an anonymous function 
could be used for !-)

More information about the Python-list mailing list