On Thu, 17 Nov 2005 12:31:08 -0800, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Dan Sommers <[EMAIL PROTECTED]> wrote: > ... >> Put the results into a dictionary (untested code follows!): [ example code snipped ] >> Now you can access the results as results['foo'], etc. Or look up >> the Borg pattern in the ASPN cookbook and you can access the results >> as results.foo, etc. > I think you mean the Bunch idiom, rather than the Borg one (which has to > do with having instances of the same class share state). Oops. <sheepish grin> You're right. Sorry. > Personally, I would rather pass myvar as well as the attribute names, > and set them with setattr, as I see some others already suggested. I lose track of things too easily that way. YMMV. Regards, Dan -- Dan Sommers <http://www.tombstonezero.net/dan/> -- http://mail.python.org/mailman/listinfo/python-list