Article of interest: Python pros/cons for the enterprise

Paul Rubin http
Fri Feb 22 06:07:39 EST 2008


Nicola Musatti <nicola.musatti at gmail.com> writes:
> In C++ memory is just another resource which you can handle just like
> any other one, possibly using RAII. 

Ok, I'll bite.  Here's a straightforward Python expression:

   a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7]

Consider how many intermediate objects are being allocated in figuring
out that listcomp.  Do you REALLY want to manage all the deallocation
with something like RAII?  



More information about the Python-list mailing list