[issue3689] reversed() not working as intended on lists

2008-08-26 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: "reversed() built in is not functioning correctly with list" is wrong -- there is no problem with reversed() on lists. The issue here is that the listreverseiterator has a strange __len__. Note that other (reverse) iterators have no __len__ at

[issue3689] reversed() not working as intended on lists

2008-08-26 Thread Jeff Hall
New submission from Jeff Hall <[EMAIL PROTECTED]>: reversed() built in is not functioning correctly with list (specifically with len() ) l = [1,2,3,4] rl = reversed(l) type(rl) vs. strings and tuples which just return 'reverse' objects listreverseiterators apparently have a len() defined tha