Eric Smith <e...@trueblade.com> added the comment: For types where it's possible, the str or repr returns a string that can be passed to eval:
>>> for i in eval(str(xrange(5))): ... print i ... 0 1 2 3 4 xrange (and list, and tuple, and others) fall into this category. ---------- nosy: +eric.smith resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6762> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com