Unexpected Python Behavior
agriff at tin.it
Fri Oct 1 23:00:34 CEST 2004
On Fri, 01 Oct 2004 08:34:50 -0400, Steve Holden <steve at holdenweb.com>
>> I didn't reply to Alex message because it's clear that he has
>> a very personal problem with me (and ... no, I've no idea why).
>It's clear to you, possibly.
Yes. Feel also free to add "IMO" at every phrase. I originally
wrote "it's clear to me" but then removed it because I didn't
like the sound of it (to me...with me).
>> My decision so was to stop feeding his hate and I ignored him;
>Hate? This doesn't sound like the Alex I know (and I'm talking about
>through the face meetings here, not just net acquaintanceship) This guy
>was the technical editor for my book, and I know him to be not only
>technically brilliant but also an affable and congenial person).
Yes... I can very well understand that this is not the Alex you
know, but it's the Alex I know. Would you just please blank
out the names and read the messages instead ?
>> that one is a problem he has with me and not the other way
>> around... may be he can try to find a solution inside himself
>> or talking to a good psychotherapist... I don't think I can
>> be of any help about it.
>Well, clearly not with an attitude like that. Frankly that's about as
>insulting as you should be getting around here. In fact I think you've
>gone too far. I preferred the sarcasm.
Can you take the time to read my messages in this thread
and Alex' replies to my messages, and tell me when was that
I passed the reasonable limit ?
>> What kind of surprised me is however that no one else contested
>> the nonsenses and/or irrelevant facts in his message. So I came
>> to the conclusion that here we're leaving the land of logic.
>Perhaps anyone who has opinions that vary from yours has a problem
>requiring psychotherapeutic help? I'm beginning to sense that I too am a
I'm not talking about this. I think Alex has a problem
with me and I really do not understand why this happened.
The problem (as I see it) started many years ago in a C++
newsgroup when I simply noted that at that time it was
IMO unfair to compare what the return code approach was
actually able to deliver (basically *all* the software we
were using at that time) with what the exception approach
was just promising.
The theme is of course very complex, but the discussion
simply ended on the spot because Alex understood that I
was calling him a dishonest (?) and then plonked me or at
least said he did (and shortly after actually left the group).
Before the alleged plonk I asked if he could actually provide
evidence that the exceptions-everywhere approach was paying
off in complex systems (I think exceptions are just wonderful
in a few special cases - i.e. when you can "rollback" or
at least "restart" a subsystem - but they're not a panacea
in general when your program state is complex, distributed
and unprotected... the core problem I see is that "strong"
exception safety doesn't scale up by composition) but his
reply was that he couldn't provide examples because it was
secret material (!?).
All this is probably on google, of course; but it's in italian.
What surprised me however is that nonsenses like the risk
of name rebinding (that pervades python; that is the
*essence* of python) were not commented. Why f,g = g,f and
not math.sin,math.cos = math.cos,math.sin ?
May be is the "pythonic" way to always privately import and
then bind functions to local names and doing all this
by using fake parameters with a default value ?
I was suprised that no one noted that if we want statics,
and the "hasattr" approach is slow then *the slowness* is
the problem. Probably a static keyword binding local names
to globally living objects to my newbie eyes would be the
best and would better describe the static local in C
(even if in python it would be arbitrary "how much" static
the var should be ... being the function definition an
executable statement should they be shared just between
calls of the same function instance ? should they be
shared between all instances of that function object ?)
I was also quite suprised about the discussion moving
to the microseconds when if I care about microseconds
the python is a questionable choice. True that python
is often "fast enough", but If I've to write uglier code
to get a 1.2x speedup then I can do it with other languages
instead of using something that is *essentially* slow
and get a 10x speedup. Ugly for ugly I'd use C++ (or
pyrex or whatever else) for that part if speed is a problem.
>> I saw just one message saying what I (as a newbie to python)
>> think is obvious to at least anyone with a reasonable brain
>> and cold enough to think without prejudice; i.e. that defining
>> def foo(x, cache=)
>> when you've no intention to receive that parameter is a purely,
>> simply, uncontestably, stinking, ugly hack (also IMO adding
>> underscores to that "cache" name is not making this hack really
>> any prettier).
>Well, of course, as a newbie to Python you are clearly in a far better
>position than anyone else to say what's reasonable. This couldn't
>possibly be a sensible use of name scoping rules to avoid the necessity
>for a static declaration, could it? Dammit, you know what a function is,
>and if it has parameters then we should damned well use them in the calls.
I'm sorry I don't understand if this is sarcasm or not...
are you really saying that using those fake parameters is
not an ugly stinking hack for the absence of a sensible
way to declare function static variables ?
Where do you stop ? Is it beautiful to use them also for
binding builtin functions you need ?
What about adding an every-other parameter with a string
default just for adding per-parameter documentation ?
>Well I don't often say this, but I think we have to get the attitude
>adjusters out here. Just sit in this chair, please, you'll just feel a
>little prick with a needle [this is a lie: I don't really have a
>needle]. There, that should feel better. Take three of the purple
>tablets a day, and come back when you are able to indulge in a
>difference of opinion without suggesting that those of a different view
Is this humor ? I've had and I'm still having a lot of
discussions with people not agreeing with me, but luckily
enough not many were so personally aggressive as Alex.
With normal people I normally end up agreeing on something,
or my counter-part does the same, or, most often, it's a
mix of the two. There are cases in which the discussion
ends up with everyone remaining with the same starting
position. But rarely I got to the "puh-LEEZE" level.
When things tend to degenerate my standard reaction has
been lately to just keep silent. This normally happens
after writing a VERY long reply, that I just avoid
posting... not because I fear the consequences; but
because all the content seems me so obvious that makes
clear the discussion left the land of logic and it's
entering the war territory. When someone I'm discussing
with is avoiding acknowledging even the obvious (and
it's clear that it can't be for a mental limit problem)
it's also obvious there's no point in keep discussing.
>I don't suppose it's come to your attention that Alex is the author of
>"Python in a Nutshell" and co-author of "The Python Cookbook", and
>therefore rather well qualified to pontificate on the vagaries of Python
Sure I know that. I didn't read either however (yet).
But the key point is that your name is just not enough
to make drink what you say without thinking; sorry if
this sounds offending, but that philosophy is a part
of me I just can't shut off.
Say something convincing and I'll be more than happy to
agree with you. Say something that IMO is wrong and I'll
say it's wrong, whatever is your name (remaining of
course well prepared to accept an explanation if you're
kind enough to explain why you stand behind your position).
And (drumrolls) Alex Martelli name is surely not the
biggest I've had discussion with. By far.
>I suspect the only offense he is actually guilty of is treating
>you as better-informed than you actually are.
I can't find a way to say more clearly that I know
basically nothing of python. The biggest python program
I wrote so far is totalling a ridicolous 3800 lines.
But tell me that
is beautiful and I can sign a paper where is stated
that you're either kidding or a dork.
More information about the Python-list