Sun Dec 12 00:56:05 CET 2004
"Dennis Lee Bieber" <wlfraed at ix.netcom.com> a écrit dans le message de news:
bppmr09m0s1d9cph2e7oj96gt30cq48a83 at 4ax.com...
> On Sat, 11 Dec 2004 12:43:01 GMT, "houbahop" <d.lapasset[Remove
> me)@chello.fr> declaimed the following in comp.lang.python:
>> Thank you everyone, but I still not understand why such a comon feature
>> passing parameters byref that is present in most serious programming
>> languages is not possible in a clean way,here in python.
> Well, in C, everything is also passed by value. The programmer
> has to explicitly pass an "address as the value" instead of the actual
> value if they want to change the contents. And, of course, the function
> has to know that it is an address, and explicitly dereference the
> address to gain access to the actual content value.
> Using my overworked and not quite complete example...
Hello and thank you,
To be honnest I must take a moment and translate your example into french to
really understand it (but I believe it's very well explained :) and I will
I remember at school when an unix teacher was explaining what was an UID and
a GID, like if the files were two persons talking and asking each other "
what's your UID?, we got the same, so, what is your GID ?", and I never had
problems with UID and GID since that :D
I have thinked to try to return an array of values like a function does
(instead of passing many params to a sub) but didn't take the time to do it.
I believe that programming in python involves to learn a kind of new
phillosophy, new words too. as an exemple of this, for me
a 'tuple' is related to database stuff. What I call an array seems to be
called a list in python (C programmers use the word 'matrix' when talking of
a two dimentionnal array, and 'vector' when talking of a one dimention
array...sorry, a list :D ).
More information about the Python-list