[LNT] r318482 - Rename duplicate() -> __copy__()
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 16:36:30 PST 2017
Author: matze
Date: Thu Nov 16 16:36:30 2017
New Revision: 318482
URL: http://llvm.org/viewvc/llvm-project?rev=318482&view=rev
Log:
Rename duplicate() -> __copy__()
__copy__ is somewhat standard in python because it is the method the
copy module is looking for.
Modified:
lnt/trunk/lnt/server/db/testsuite.py
Modified: lnt/trunk/lnt/server/db/testsuite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/testsuite.py?rev=318482&r1=318481&r2=318482&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/testsuite.py (original)
+++ lnt/trunk/lnt/server/db/testsuite.py Thu Nov 16 16:36:30 2017
@@ -187,7 +187,7 @@ class MachineField(FieldMixin, Base):
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, ))
- def duplicate(self):
+ def __copy__(self):
return MachineField(self.name)
@@ -216,7 +216,7 @@ class OrderField(FieldMixin, Base):
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.ordinal))
- def duplicate(self):
+ def __copy__(self):
return Ordinal(self.name, self.ordinal)
@@ -238,7 +238,7 @@ class RunField(FieldMixin, Base):
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, ))
- def duplicate(self):
+ def __copy__(self):
return RunField(self.name)
@@ -278,7 +278,7 @@ class SampleField(FieldMixin, Base):
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.type, ))
- def duplicate(self):
+ def __copy__(self):
return SampleField(self.name, self.type, self.status_field,
self.bigger_is_better)
@@ -397,7 +397,7 @@ def _sync_fields(session, existing_field
existing = existing_field
break
if existing is None:
- existing_fields.append(new_field.duplicate())
+ existing_fields.append(new_field.__copy__())
def sync_testsuite_with_metatables(session, testsuite):
More information about the llvm-commits
mailing list