DRY
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
|
||||
class SlitBase:
|
||||
|
||||
def __call__(self, width, height):
|
||||
self.set_hg(width)
|
||||
self.set_vg(height)
|
||||
|
||||
def __repr__(self):
|
||||
string1 = "gap: (%g,%g) mm" % (self.get_hg(), self.get_vg())
|
||||
string2 = "pos: (%g,%g) mm" % (self.get_ho(), self.get_vo())
|
||||
return "\n".join((string1, string2))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user