Changeset 3056:f2b66bd5429a in livinglogic.python.xist

Show
Ignore:
Timestamp:
12/13/07 14:36:53 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Don't use setdefault in Converter.getitem().

Files:
1 modified

Legend:

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

    r3053 r3056  
    214214            return self.contexts[contextclass] 
    215215        except KeyError: 
    216             return self.contexts.setdefault(contextclass, contextclass()) 
     216            context = contextclass() 
     217            self.contexts[contextclass] = context 
     218            return context