Diez B. Roggisch wrote:
  lst = list(genexp)
  tpl = tuple(genexp)


Since in such cases the object is build in memory any way, I don't think it would be a problem of having them prebuilt in memory, or am I missing something?


Yes. Consider this:

lst = list(time.time() for i in xrange(10))
tpl = tuple(time.time() for i in xrange(10))




Would it be a bad solution to make that a list or tuple of ten time.time() calls, you could also restrict what theese prebuilding sequenses could contain, or perhaps try to prebuild them, and then fail if it's impossible.


-- -------------------------------------- Ola Natvig <[EMAIL PROTECTED]> infoSense AS / development -- http://mail.python.org/mailman/listinfo/python-list



Reply via email to