Iterate creating variables?

Calvin Spealman ironfroggy at socialserve.com
Sun Jun 15 19:20:38 CEST 2008


That smells bad the same was the eval() usage in the thread "Hard to  
understand 'eval'". This is only one pythoners opinion, of course.

On Jun 13, 2008, at 3:29 PM, Jason Scheirer wrote:
> for x in xrange(1, 26):
>   setattr(self, 'checkbox_%i' % x, ...)
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list