Jonathan Gardner wrote:
[...eloquent and interesting discussion of variable system snipped...]
>
Is Python's variable system better than perl's? It depends on which
way you prefer. As for me, being a long-time veteran of perl and
Python, I don't think having a complicated variable system such as
On Aug 13, 2:12 am, Jonathan Gardner <[EMAIL PROTECTED]>
wrote:
> On Aug 12, 9:17 am, Palindrom <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi everyone !
>
> > I'd like to apologize in advance for my bad english, it's not my
> > mother tongue...
>
> > My girlfriend (who is a newbie in Python, but knows Pe
On Aug 12, 9:17 am, Palindrom <[EMAIL PROTECTED]> wrote:
> Hi everyone !
>
> I'd like to apologize in advance for my bad english, it's not my
> mother tongue...
>
> My girlfriend (who is a newbie in Python, but knows Perl quite well)
> asked me this morning why the following code snippets didn't gi
Thank you both for your reply !
On Tue, Aug 12, 2008 at 8:52 PM, Demarche Bruno <[EMAIL PROTECTED]> wrote:
> Thank you Nigel, it's clearer for both of us now.
> I think wat confused her is the fact that :
>
> L = [1,2,3]
> def foo(my_list):
>my_list.append(4)
>
> will modify L, while the follo
Thank you Nigel, it's clearer for both of us now.
I think wat confused her is the fact that :
L = [1,2,3]
def foo(my_list):
my_list.append(4)
will modify L, while the following:
L = [1,2,3]
def foo(my_list):
my_list = [1,2,3,4]
will not.
On Tue, Aug 12, 2008 at 6:46 PM, Nigel Rantor <[
Palindrom wrote:
### Python ###
liste = [1,2,3]
def foo( my_list ):
my_list = []
The above points the my_list reference at a different object. In this
case a newly created list. It does not modify the liste object, it
points my_list to a completely different object.
### Perl ###
@ls
In article
<[EMAIL PROTECTED]>,
Palindrom <[EMAIL PROTECTED]> wrote:
> Hi everyone !
>
> I'd like to apologize in advance for my bad english, it's not my
> mother tongue...
>
> My girlfriend (who is a newbie in Python, but knows Perl quite well)
> asked me this morning why the following code s
Hi everyone !
I'd like to apologize in advance for my bad english, it's not my
mother tongue...
My girlfriend (who is a newbie in Python, but knows Perl quite well)
asked me this morning why the following code snippets didn't give the
same result :
### Python ###
liste = [1,2,3]
def foo( my_li