Ticket #2102: for_loop_with_generator.diff

File for_loop_with_generator.diff, 465 bytes (added by dbm-django@…, 18 years ago)
  • defaulttags.py

     
    8888            values = []
    8989        if values is None:
    9090            values = []
     91        if not hasattr(values, '__len__'):
     92            values = list(values)
    9193        len_values = len(values)
    9294        if self.reversed:
    9395            # From http://www.python.org/doc/current/tut/node11.html
Back to Top