apply suggestions from @rbberger for more readable code
This commit is contained in:
@ -299,9 +299,9 @@ class dump:
|
|||||||
|
|
||||||
# if snapshots are scaled, unscale them
|
# if snapshots are scaled, unscale them
|
||||||
|
|
||||||
if (not "x" in self.names) or \
|
if ("x" not in self.names) or \
|
||||||
(not "y" in self.names) or \
|
("y" not in self.names) or \
|
||||||
(not "z" in self.names):
|
("z" not in self.names):
|
||||||
print("no unscaling could be performed")
|
print("no unscaling could be performed")
|
||||||
elif self.nsnaps > 0:
|
elif self.nsnaps > 0:
|
||||||
if self.scaled(self.nsnaps-1): self.unscale()
|
if self.scaled(self.nsnaps-1): self.unscale()
|
||||||
@ -582,8 +582,8 @@ class dump:
|
|||||||
pairs = self.names.items()
|
pairs = self.names.items()
|
||||||
str = ""
|
str = ""
|
||||||
for i in range(ncol):
|
for i in range(ncol):
|
||||||
for p in pairs:
|
for k,v in pairs:
|
||||||
if p[1] == i: str += p[0] + ' '
|
if v == i: str += k + ' '
|
||||||
return str
|
return str
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user