calculating the size of an array passed to a function

Rajarshi Guha rxg218 at psu.edu
Thu Jan 3 11:29:37 EST 2002


Hi,
  when I pass a 1D array to a function as a pointer sizeof() will give me 
the size of the pointer. Is there anyway I can calculate the size of the 
recieved array without having to pass a length parameter as well?

TIA,

-- 
-------------------------------------------------------------------
Rajarshi Guha                  | email: rajarshi at presidency.com
417 Davey Laboratory           | web  : www.jijo.cjb.net
Department of Chemistry        |        www.rajarshi.outputto.com
Pennsylvania State University  | ICQ  : 123242928
                               | 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