Python's biggest compromises

sismex01 at hebmex.com sismex01 at hebmex.com
Thu Jul 31 18:33:25 EDT 2003


> From: akhleung at earthlink.net [mailto:akhleung at earthlink.net] 
> Sent: Jueves, 31 de Julio de 2003 01:41 p.m.
> 
> It seems to me that a big compromise/feature is that all kinds of
> namespaces are usually represented by dictionaries, and that Python
> exposes this fact to the programmer.  This would seem to limit the
> possible optimizations that can easily be performed by a compiler.
> 
> BTW, I have only read about Python out of interest, and haven't
> actually used it for anything, so I hope my remark isn't ignorant.
> 
> Best regards,
> Aaron
>

Hello Aaron.

Actually, this which you call a compromise, is one of Python's
biggest strengths: it allows you, as a programmer, to perform
many things which in other languages would be simply impossible,
or at least would force you to jump through plenty loops and
hoops.

Take a look at Alex Martelli's Borg pattern, it shows what can
be done by having open access to class *and* object namespaces,
and being able to manipulate them.  In Python it's easy and
straightforward (eek), but in other languages, well... you have
whole books dedicated to that.

We're all adults, and all that. :-)

-gustavo



Advertencia:La informacion contenida en este mensaje es confidencial y
restringida, por lo tanto esta destinada unicamente para el uso de la
persona arriba indicada, se le notifica que esta prohibida la difusion de
este mensaje. Si ha recibido este mensaje por error, o si hay problemas en
la transmision, favor de comunicarse con el remitente. Gracias.





More information about the Python-list mailing list