diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index d06f4ad84b..42b37b661d 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -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) diff --git a/src/ifcopenshell-python/ifcopenshell/guid.py b/src/ifcopenshell-python/ifcopenshell/guid.py index c8e2340fb9..ddc95694b9 100644 --- a/src/ifcopenshell-python/ifcopenshell/guid.py +++ b/src/ifcopenshell-python/ifcopenshell/guid.py @@ -19,6 +19,8 @@ import string +from functools import reduce + chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$' def compress(g):