Re: Howto pass Array/Hash into Function

2006-10-03 Thread Fredrik Lundh
Wijaya Edward wrote: > Thanks for your understanding Steve. > > Furthermore, my related concern > is how does Python actually deal with 'reference' in Perl. > But now, it is clear to me now that Python simply treats > them as object. sounds like you really need to reset your brain: http

RE: Howto pass Array/Hash into Function

2006-10-03 Thread Wijaya Edward
PROTECTED] on behalf of Steve Holden Sent: Tue 10/3/2006 8:08 PM To: python-list@python.org Subject: Re: Howto pass Array/Hash into Function It wouldn't be obvious to someone who learned Perl as their first programming language because Perl chose to ignore the otherwise almost universal

Re: Howto pass Array/Hash into Function

2006-10-03 Thread Steve Holden
MonkeeSage wrote: > Wildemar Wildenburger wrote: > >>MonkeeSage wrote: >> >>>Wijaya Edward wrote: >>> I wonder how can that be done in Python. >>> >>>def myfunc(plain_var, hash_ref, arref): >>> # Do sth with those variables >>> return >> >>At the risk of being a jerk (sorry, I'm really just

Re: Howto pass Array/Hash into Function

2006-10-03 Thread Gabriel G
At Tuesday 3/10/2006 06:05, Wijaya Edward wrote: How can I pass Array, Hash, and a plain variable in to a function at the same time. I come from Perl. Where as you probably know it is done like this: sub myfunc { my ($plain_var, $hash_ref,$arref) = @_; # Do sth with those variables

Re: Howto pass Array/Hash into Function

2006-10-03 Thread MonkeeSage
Wildemar Wildenburger wrote: > MonkeeSage wrote: > > Wijaya Edward wrote: > >> I wonder how can that be done in Python. > > > > def myfunc(plain_var, hash_ref, arref): > > # Do sth with those variables > > return > > At the risk of being a jerk (sorry, I'm really just curious): > Why isn't that

Re: Howto pass Array/Hash into Function

2006-10-03 Thread Wildemar Wildenburger
MonkeeSage wrote: > Wijaya Edward wrote: >> I wonder how can that be done in Python. > > def myfunc(plain_var, hash_ref, arref): > # Do sth with those variables > return At the risk of being a jerk (sorry, I'm really just curious): Why isn't that obvious? wildemar (sorry) -- http://mail.pyt

Re: Howto pass Array/Hash into Function

2006-10-03 Thread MonkeeSage
Wijaya Edward wrote: > I wonder how can that be done in Python. def myfunc(plain_var, hash_ref, arref): # Do sth with those variables return Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list