By value or by reference?

Bengt Richter bokr at oz.net
Tue Oct 19 16:03:39 EDT 2004


On Tue, 19 Oct 2004 21:15:21 +0200, aleaxit at yahoo.com (Alex Martelli) wrote:

>Josiah Carlson <jcarlson at uci.edu> wrote:
>
>> > > I agree with most everything you have said, though consider the pointer
>> > > vs. value of C to define the semantics of the passing.  That is, if you
>> > > get a pointer in C, it is by reference.  If you don't get a pointer, it
>> > > is by value.
>> > 
>> > I disagree: you get the value of the pointer.  If you assign to the
>> > barename of the pointer, this has no effect on the caller.
>> 
>> [snip the remainder of the email]
>> 
>> Sounds good.  Now with the semantic arguments out of the way, is there a
>> link where the equivalent of what was just said is available in the
>> documentation?
>> 
>> If yes, great.  If not, perhaps what has been discussed should be
>> slimmed down and inserted into the FAQ so that future generations don't
>> need to rehash this conversation.
>
>Sure, but it's a vain hope -- 2 out of 3 questions asked here ARE about
>stuff well covered in the FAQ, anyway.
>
I keep thinking there should be a tech fix for part of this problem. E.g.,
if interactive python help supported help(faqtopic='whatever') and that
automatically used urllib to search the latest faq (caching stuff perhaps)
and produced a topic-oriented HTML page with links to likely faq items, and
started a browser to display it ...
Hm, sounds like google with a site restriction. Maybe faq should live on
faq.python.org and help(faqtopic='...') could leverage that?

Anyway, the other part is feeding good stuff like your posted explanations
into the faq. I keep thinking a little posting markup of some sort could
make automated harvesting of c.l.py archives for faq snippets possible.

Regards,
Bengt Richter



More information about the Python-list mailing list