pyslha.py

changeset 195
880af4ab57ba
parent 194
b6709078072b
child 196
7caa9b877b18
     1.1 --- a/pyslha.py	Sun Apr 28 18:38:46 2013 +0200
     1.2 +++ b/pyslha.py	Sun Apr 28 18:41:46 2013 +0200
     1.3 @@ -108,13 +108,14 @@
     1.4          else:
     1.5              self.entries[tuple(entry[:-1])] = entry[-1]
     1.6  
     1.7 -    def items(self, key):
     1.8 +    def items(self, key=None):
     1.9          return self.entries.iteritems()
    1.10  
    1.11      @property
    1.12      def value(self):
    1.13          if len(self.entries) != 1:
    1.14              raise AccessError("Request for unique value of a multi-value block")
    1.15 +        return self.entries.values()[0]
    1.16  
    1.17      def __len__(self):
    1.18          return len(self.entries)

mercurial