Howto pass Array/Hash into Function

Steve Holden steve at holdenweb.com
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.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list