Any way to loop through object variables?

D

Dave Challis

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
Just wondering if there's a way to iterate through all variables which
an object has set?

Specifically, I'm using the OptionParser module, which returns an
options object, containing all command line options as object variables.
I'd like to iterate over these rather than getting at them by name.

Cheers,
Dave
- --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__/|_
><> / o \/|
Dave Challis )><> \_____/\|
(e-mail address removed)______(____________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPXpHv26GZvAVVFERAmkaAKDUJuGk8L2nJf8B9b1RaMYpVr9bCwCaAubM
TWdK4AmzAgpKNQxZK3AOB4Q=
=6STh
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top