Modifying the {} and [] tokens

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Sat Aug 23 14:56:08 EDT 2003


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

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

I am sorry, Geoff, but I can't understand how you perceived my post as
insulting.  If I did understand a way, I would apologise.  I just
snipped stuff in order to make my post shorter, according to netiquette.
How can the phrase inside the brackets seem insulting to you?  Geoff,
please justify your clause, and I will gladly apologise.

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

I don't know, I can speak for myself only.  How many people have
responded to you this "way" to make you wonder about the whole group?

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

This is the deal, indeed; for example, I would enjoy very much generator
comprehensions in the language, and yet they were rejected.

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

My reply came to your specific feature request, ie Python allowing you
to modify the base types; your asking if *any* feature request is
disallowed is not justified.  I consider your question similar to the
following dialog:

- Can I have cherry pie with my meal?
- No, because the cook has decided it does not match with your meal,
which is fish.
- So no one is allowed to ask for dessert here?

I believe that the symbolism is childish, and this indeed you might find
it insulting, although it isn't.  I am not as fluent in English as I
would like, so this is my way to express the general feeling I got from
your reply; I call it "black-and-white", or "ping-pong", lacking a
better English word, and describes a two-way communication where a
disagreement on the one side is perceived magnified as total rejection
on the other side.

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

What should it matter what you mind then?  It's Guido's language.
Either we both are allowed to say our minds, or not.  My opinion is as
important as yours.  Keep that in mind, please.

The fact is, the subject has been brought up in the past, and it has
been skipped.  I am not sure if has been rejected, so you might have a
chance.  If you are as warm about this subject as you seem to be, write
a PEP; my vote will probably be positive.  But Guido is the one to
convince, and he listens; my experience so far has shown that he never
replies the way you do, and that is good.

This URL should be useful:
http://www.python.org/peps/pep-0001.html

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

Your last statement is unjustified too, and "black-and-white", assuming
hidden meanings in my words.  Geoff, I am picking my words very
carefully because I don't want to make you jump to the ceiling with
rage.  Please read, don't assume.

My sentence was a practical (and respectful!) suggestion; Ruby already
has what you want, and you like it, so why not use it, since the Python
community (and Guido most of all) are against such a modification?  Did
you do a research in older newsgroup threads before posting?

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

Perhaps you are irritated by earlier discussions, whom I'm not in the
mood to look for; this might explain your misinterpretation of my
message.   Geoff, my attitude was not insulting.  It was practical.

>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, please.  Your last statement inside the parentheses is based on
false assumptions, which is bad, because you already had the data.  From
my previous post I said I'd possibly like what you suggest, and I meant
it --and still do.  If you don't believe me, if you feel that I am
bullying you, lying to you, using sarcasm or irony on you, then I'll
have to give up.

Don't spend your energy fighting with me (one-side fights: only on
USENET :), write a PEP and find good arguments for it.
-- 
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.




More information about the Python-list mailing list