By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

Any way to loop through object variables?

P: n/a
-----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 )>< \_____/\|
__*****@ecs.soton.ac.uk______(___________________________________________ _
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPXpHv26GZvAVVFERAmkaAKDUJuGk8L2nJf8B9b1RaM YpVr9bCwCaAubM
TWdK4AmzAgpKNQxZK3AOB4Q=
=6STh
-----END PGP SIGNATURE-----
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.