summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index 533f0a2..f7df4ed 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -60,6 +60,13 @@ class LengthUnit:
else:
return id(self) == id(other)
+ # This class is a singleton, we don't want copies around
+ def __copy__(self):
+ return self
+
+ def __deepcopy__(self, memo):
+ return self
+
MILLIMETERS_PER_INCH = 25.4
Inch = LengthUnit('inch', 'in', MILLIMETERS_PER_INCH)