syntax question

Rajarshi Guha rxg218 at psu.edu
Thu Nov 22 17:01:45 CET 2001


Hi,
  I saw this code snippet in teh Google archives:

def V(*vals):
  return array(vals)

c = V(256,256)

And then c is a Numpy array.

I can see that the *vals takes in a tuple - is this orrect or are there any 
other significances of this sytnax?

TIA

-- 
-------------------------------------------------------------------
Rajarshi Guha                  | email: rajarshi at presidency.com
152 Davey Laboratory           | web  : www.rajarshi.outputto.com 
Department of Chemistry        | ICQ  : 123242928
Pennsylvania State University  | AIM  : LoverOfPanda
-------------------------------------------------------------------
GPG Fingerprint: DCCB 4D1A 5A8B 2F5A B5F6  1F9E CDC4 5574 9017 AF2A 
Public Key     : http://pgp.mit.edu/
-------------------------------------------------------------------
All seems condemned in the long run to approximate a state akin to
Gaussian noise.
                -- James Martin




More information about the Python-list mailing list