mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
python 2/3 compatibility: from functools import reduce
This commit is contained in:
@@ -20,11 +20,11 @@
|
|||||||
import os
|
import os
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
from . import guid
|
from . import guid
|
||||||
from . import ifcopenshell_wrapper
|
from . import ifcopenshell_wrapper
|
||||||
|
|
||||||
if hasattr(functools, 'reduce'): reduce = functools.reduce
|
|
||||||
|
|
||||||
class entity_instance(object):
|
class entity_instance(object):
|
||||||
def __init__(self, e):
|
def __init__(self, e):
|
||||||
super(entity_instance, self).__setattr__('wrapped_data', e)
|
super(entity_instance, self).__setattr__('wrapped_data', e)
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$'
|
chars = string.digits + string.ascii_uppercase + string.ascii_lowercase + '_$'
|
||||||
|
|
||||||
def compress(g):
|
def compress(g):
|
||||||
|
|||||||
Reference in New Issue
Block a user