Modifying the {} and [] tokens

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Sat Aug 23 15:40:17 CEST 2003


On Sat, 23 Aug 2003 09:16:13 GMT, rumours say that Geoff Howland
<ghowland at lupineNO.SPAMgames.com> might have written:

[snip of python's by design inability to modify the base C types: dict,
str,  list etc]

>Ruby has this built in, it's useful, it's complete.  It's obvious what
>is happening, so it's not unclean.  It's allowed for other containers.

It seems that code "terseness" is more important to you than code
readability.  I can sympathise with that, perhaps I'd like that too, but
I believe I fully understand Guido's decisions over the years to
disallow that kind of stuff.

I really don't mind subclassing base types and using MyDict() instead of
{}.  I want to be able to make my own APIs (MyDict.update *could* blow
whistles and roll twice on the floor before resetting the machine), but
I also want a steady and well-known API for base types (dict.update
*should* update a dictionary from another one).

You can always roll off a customised Python interpreter, of course, but
it won't be Python anymore.

With all due respect, Geoff, if this stuff is really important to you,
use Ruby.
-- 
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.




More information about the Python-list mailing list