Howto pass Array/Hash into Function

Steve Holden steve at
Tue Oct 3 14:08:12 CEST 2006

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 curious):
>>Why isn't that obvious?
>>wildemar (sorry)
> I wondered that too and wasn't even going to answer, but then I thought
> mabye the question was meant to be more general, like "what is the
> syntax for passing objects to functions in python?"
It wouldn't be obvious to someone who learned Perl as their first 
programming language because Perl chose to ignore the otherwise almost 
universal convention that formal parameters determine the arguments that 
a function or procedure can be calles with.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list