Re: Please explain this for me

2011-12-20 Thread Emeka
Noah, Calvin Thanks so much! Regards, Emeka On Wed, Dec 21, 2011 at 6:57 AM, Noah Hall wrote: > On Wed, Dec 21, 2011 at 4:39 AM, Emeka wrote: > > > > Hello All, > > > v = [] > > > > def add_to_list(plist): > > u = plist.append(90) > > return u > > > > add_to_list(v) # This function c

Re: Please explain this for me

2011-12-20 Thread Noah Hall
On Wed, Dec 21, 2011 at 4:39 AM, Emeka wrote: > > Hello All, > v = [] > > def add_to_list(plist): >     u = plist.append(90) >     return u > > add_to_list(v)  # This function call returns nothing > Could someone explain why this function call will return nothing? It's because add_to_list return

Re: Please explain this for me

2011-12-20 Thread Calvin Spealman
On Dec 20, 2011 11:41 PM, "Emeka" wrote: > > > Hello All, > > v = [] > > def add_to_list(plist): > u = plist.append(90) > return u > > add_to_list(v) # This function call returns nothing > Could someone explain why this function call will return nothing? > > v = [90] # Object values are p

Please explain this for me

2011-12-20 Thread Emeka
Hello All, v = [] def add_to_list(plist): u = plist.append(90) return u add_to_list(v) # This function call returns nothing Could someone explain why this function call will return nothing? v = [90] # Object values are passed by reference This one is clear to me add_to_list([]) This o