python 2/3 compatibility: from functools import reduce

This commit is contained in:
Thomas Krijnen
2015-01-20 13:52:08 +00:00
parent 97b6f444d1
commit e37b062757
2 changed files with 4 additions and 2 deletions
@@ -20,11 +20,11 @@
import os
import functools
from functools import reduce
from . import guid
from . import ifcopenshell_wrapper
if hasattr(functools, 'reduce'): reduce = functools.reduce
class entity_instance(object):
def __init__(self, e):
super(entity_instance, self).__setattr__('wrapped_data', e)
@@ -19,6 +19,8 @@
import string
from functools import reduce
chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$'
def compress(g):