1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

2to3 on pysollib/configobj/*.py

This commit is contained in:
Shlomi Fish 2017-05-13 19:52:55 +03:00
parent 8dd5d78446
commit d936194272

View file

@ -16,7 +16,6 @@
# http://lists.sourceforge.net/lists/listinfo/configobj-develop # http://lists.sourceforge.net/lists/listinfo/configobj-develop
# Comments, suggestions and bug reports welcome. # Comments, suggestions and bug reports welcome.
from __future__ import generators
import sys import sys
import os import os
@ -94,7 +93,7 @@ BOM_SET = {
} }
try: try:
from validate import VdtMissingValue from pysollib.configobj.validate import VdtMissingValue
except ImportError: except ImportError:
VdtMissingValue = None VdtMissingValue = None
@ -177,7 +176,7 @@ class Builder:
return m(o) return m(o)
def build_List(self, o): def build_List(self, o):
return map(self.build, o.getChildren()) return list(map(self.build, o.getChildren()))
def build_Const(self, o): def build_Const(self, o):
return o.value return o.value
@ -186,7 +185,7 @@ class Builder:
d = {} d = {}
i = iter(map(self.build, o.getChildren())) i = iter(map(self.build, o.getChildren()))
for el in i: for el in i:
d[el] = i.next() d[el] = next(i)
return d return d
def build_Tuple(self, o): def build_Tuple(self, o):
@ -204,7 +203,7 @@ class Builder:
raise UnknownType('Undefined Name') raise UnknownType('Undefined Name')
def build_Add(self, o): def build_Add(self, o):
real, imag = map(self.build_Const, o.getChildren()) real, imag = list(map(self.build_Const, o.getChildren()))
try: try:
real = float(real) real = float(real)
except TypeError: except TypeError:
@ -681,7 +680,7 @@ class Section(dict):
def items(self): def items(self):
""" """ """ """
return zip((self.scalars + self.sections), self.values()) return list(zip((self.scalars + self.sections), list(self.values())))
def keys(self): def keys(self):
""" """ """ """