Modifying the {} and [] tokens

Geoff Howland ghowland at lupineNO.SPAMgames.com
Sat Aug 23 12:04:52 EDT 2003


On Sat, 23 Aug 2003 16:40:17 +0300, Christos "TZOTZIOY" Georgiou
<tzot at sil-tec.gr> wrote:

>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]

This post begins to read as an insult here, and continues.  My
incredible gall at thinking something may be better if it was changed
and wanting to try it!  I should be pelted with rocks for speaking the
name Jehova.

Is this really the way this group is going to continue?

>>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.

[] + [] is allowed.  Right?

{} + {} is not allowed.

len([]) is allowed.

[].len() is not allowed.

Why?  I respect Guidos decsions, Python needs a strong leader to make
them and it got where it is (great language) by having him and the
rest of the community help out in this regard.

Is now no one allowed to say "hey, I think this should be done, and
I'd like to make it happen to give it a try"?  It's not like if it
becomes a problem it couldn't be reverted and lesson learned right?
Programming is ABOUT experimentation, not dogmatic obedience.

>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).

Why should it matter what you mind?  It's my code.

>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.

Yes, throw the heathen into another language.  I'm not good enough for
this one.

I find this attitude really insulting.  I like Python for what it is,
that doesnt mean I dont think there are some things that could be
better and want to try them.  I wanted to know if it's possible, so I
asked.  I think it's important, so I persisted.  Get over it.  Stop
making this place an unpleasant place to ask questions in fear of not
asking in a Pythonic enough way.

Not the first time I've seen this here, I'm sure it wont be the last.
Not sure how many people never picked it up because they were smacked
down before they found their groove in Python.

I'm sorry this sounds heavy and upset, but I would like this place to
not feel so bitter against exploratory questions.  Bounds are set in
Python, it's good.  It doesn't mean people shouldn't ask and explore
and find out for themselves what is best if it is possible.  I could
even go and change all the Python C source to make this work, who is
it going to hurt but myself?  It may even bring me valuable insight
that I can then share as an _opinion_ with others who ask later (note,
not telling them to use another language because they want to do
something I dont agree with).


-Geoff Howland
http://ludumdare.com/




More information about the Python-list mailing list