Changeset 3113:7cb8a76181ea in livinglogic.python.xist

Show
Ignore:
Timestamp:
01/06/08 00:49:09 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Make iterator check in tonode() less destructive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xsc.py

    r3106 r3113  
    8484        # Maybe it's an iterator/generator? 
    8585        try: 
    86             return Frag(*list(value)) 
     86            value = iter(value) 
    8787        except TypeError: 
    8888            pass 
     89        else: 
     90            return Frag(*list(value)) 
    8991    raise IllegalObjectError(value) # none of the above => bail out 
    9092