fixing the thinger.

This commit is contained in:
Paul R. Tagliamonte 2013-03-08 20:21:32 -05:00
parent 3028570995
commit db39a81a30

View File

@ -28,9 +28,9 @@ class HyObject(object):
def replace(self, other): def replace(self, other):
if isinstance(other, HyObject): if isinstance(other, HyObject):
self.start_line = other.start_line for attr in ["start_line", "end_line",
self.end_line = other.end_line "start_column", "end_column"]:
self.start_column = other.start_column if not hasattr(self, attr):
self.end_column = other.end_column setattr(self, attr, getattr(other, attr))
else: else:
raise TypeError("Can't replace a non Hy object with a Hy object") raise TypeError("Can't replace a non Hy object with a Hy object")