From: Terry Reedy on
On 2/9/2010 12:12 AM, Alf P. Steinbach wrote:

> As far as the language spec is concerned the argument passing mechanism
> seems to me to be identical to assignments, not just "very much like".

Except for the cross-namespace nature of the assignment, yes. Glad you
agree.

> Your phrase "or objects derived therefrom" seems to imply that immutable
> objects can be copied

No. Given

def f(*args, **kwds): print(args, kwds)

the objects bound to args and kwds are a tuple and dict *derived* from
(that collect together) the objects passed.

Terry Jan Reedy

From: Alf P. Steinbach on
* Duncan Booth:
> "Alf P. Steinbach" <alfps(a)start.no> wrote:
>
>> A copyable reference is a pointer. That is, a "pointer", in e.g. the
>> Java sense,
>> and in the general language independent sense, means a copyable
>> reference -- as illustrated e.g. in the Stanford computer science
>> 101 course page I
>> referred you to earlier, with C versus Java pointers illustrated in
>> the concrete.
>
> The fact that C style pointers are used internally is an detail of the
> CPython implementation.

Your statement seems pretty irrelevant to anything.

It's almost hilarious, quoting a single paragraph about how irrelevant the C
pointer is, and responding with something like that.

Do you understand that you're restating (in the form of exemplifying) what
you're quoting?


> In CPython objects once created remain in the same memory location (and
> their id is their address). Compare that to IronPython where the objects
> themselves can move around in memory so they have no fixed address. Try
> comparing the IronPython implementation to C pointers and you'll cause a
> lot of confusion. e.g. someone might think the id() value is in some way
> related to an address.

Did you /read/ what you quoted?


> Ruby implements integers without using any pointers at all: there's nothing
> in the Python specification which prevents a Python implementation doing
> the same for small integers, in fact I believe it has been tried but wasn't
> found to improve performance.

All theree of your points about Python are wrong; I don't know about the Ruby point.

First, the current Python language specification formally prevents the
optimization you mention, because there's no support for binding to do anything
but direct binding leaving object identities unchanged.

But in practice that's no big deal though: I can't imagine any code relying on
identities of completely immutable objects.

Second, even the variant that was tried improved performance.

But it would reportedly have wreaked havoc with imperfect C code.

Third, the optimization doesn't do away with pointers. If it did then it would
transform the language completely. The user's view is still one where names
denote pointers.


> The terminology of 'objects', 'names', 'references' describes an abstract
> machine. The Python runtime can implement it in any way it chooses so long
> as those semantics are preserved. One implementation involves 'pointers',

It seems that you're thinking of C pointers.

That's pretty dumb since

(1) it doesn't make sense, and

(2) it has been mentioned in almost every article in this thread, including
my first, and including the single paragraph that *you quoted above*,
which was only about that, that

we're not talking about C pointers here.

Python names denote pointers by definition (of pointer).


> but that word implies other baggage which is not a required part of the
> model.

The word itself doesn't imply other baggage, no.

It might help to *read* what you're quoting, try to follow references, so on.


Cheers & hth.,

- Alf
From: Alf P. Steinbach on
* Steve Holden:
> Alf P. Steinbach wrote:
>> * Stephen Hansen:
> [...]
>>> I've heard that before, and have no idea why, nor any real interest in
>>> solving it: I don't want to read cpl via Usenet, and prefer to read it
>>> as a mailing list. Somewhere between Gmail->python.org->python.org
>>> <http://python.org>'s usenet server->the world, some people don't seem
>>> to get my posts. Yet it shows up on some news servers, not others.
>>>
>>> No idea. Nothing I know of can solve it.
>> Not sure, but perhaps it's possible to mail directly to gmane?
>>
> Is there *any* problem you don't have a fatuous answer for?

I thought the answer could help.

You thought you cold do a bit of ad hominem attack.

That's the difference between us.


Cheers,

- Alf
From: Steve Holden on
Alf P. Steinbach wrote:
> * Steve Holden:
>> Alf P. Steinbach wrote:
>>> * Stephen Hansen:
>> [...]
>>>> I've heard that before, and have no idea why, nor any real interest in
>>>> solving it: I don't want to read cpl via Usenet, and prefer to read it
>>>> as a mailing list. Somewhere between Gmail->python.org->python.org
>>>> <http://python.org>'s usenet server->the world, some people don't seem
>>>> to get my posts. Yet it shows up on some news servers, not others.
>>>>
>>>> No idea. Nothing I know of can solve it.
>>> Not sure, but perhaps it's possible to mail directly to gmane?
>>>
>> Is there *any* problem you don't have a fatuous answer for?
>
> I thought the answer could help.
>
> You thought you cold do a bit of ad hominem attack.
>
> That's the difference between us.
>
Well, the way I see it, you assumed you knew better than Stephen, and
insisted on proposing a solution to a problem that he clearly stated he
had no interest in. I'm not quite sure, given that, what the point of
the advice was.

However, my question was genuine, based on your observed behavior. I
agree I might have phrased it more politely, but I do find your
self-assurance somewhat irritating.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

From: Alf P. Steinbach on
* Steve Holden:
> Alf P. Steinbach wrote:
>> * Steve Holden:
>>> Alf P. Steinbach wrote:
>>>> * Stephen Hansen:
>>> [...]
>>>>> I've heard that before, and have no idea why, nor any real interest in
>>>>> solving it: I don't want to read cpl via Usenet, and prefer to read it
>>>>> as a mailing list. Somewhere between Gmail->python.org->python.org
>>>>> <http://python.org>'s usenet server->the world, some people don't seem
>>>>> to get my posts. Yet it shows up on some news servers, not others.
>>>>>
>>>>> No idea. Nothing I know of can solve it.
>>>> Not sure, but perhaps it's possible to mail directly to gmane?
>>>>
>>> Is there *any* problem you don't have a fatuous answer for?
>> I thought the answer could help.
>>
>> You thought you cold do a bit of ad hominem attack.
>>
>> That's the difference between us.
>>
> Well, the way I see it, you assumed you knew better than Stephen, and
> insisted on proposing a solution to a problem that he clearly stated he
> had no interest in.

You're going into motivations, that it seems to me that you're projecting,
saying that any helpful suggestion mean that one thinks one knows better and
implies a desire to demonstrate imagined superiority.

You're trying to portray a helping hand as a negative personal characteristic of
the helper.

"the only reason that guy tries to help you is because he wishes to show how
superior he (thinks he) is".

That's your style in a fair number of postings, and now here:

* ad hominem attack,

* projection (at least the way I read it), and

* inject - noise - about - something - completely - irrelevant

Note that readers can easily guess about motivations for the last.


> I'm not quite sure, given that, what the point of the advice was.

There are many people who read just the Usenet group, e.g. via Google groups.

When you say you don't understand the point of the advice, you're saying that

* those people don't matter, and that

* it doesn't matter whether they can read Stephen Hansen's articles.

That's

* slighting Stephen Hansen, and

* showing off an extreme ego-centric view of the world,

sorry.


> However, my question was genuine, based on your observed behavior. I
> agree I might have phrased it more politely, but I do find your
> self-assurance somewhat irritating.

Thanks. :-)


Cheers & hth.,

- Alf