nicer formatting

This commit is contained in:
Martin Diehl 2021-10-11 21:57:13 +02:00
parent d4546fa477
commit c693006dd8
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ class Crystal():
"""Represent.""" """Represent."""
return '\n'.join([f'Crystal family {self.family}'] return '\n'.join([f'Crystal family {self.family}']
+ ([] if self.lattice is None else [f'Bravais lattice {self.lattice}']+ + ([] if self.lattice is None else [f'Bravais lattice {self.lattice}']+
list(map(lambda x:f'{x[0]}:{x[1]:.5g}', list(map(lambda x:f'{x[0]}: {x[1]:.5g}',
zip(['a','b','c','alpha','beta','gamma',], zip(['a','b','c','α','β','γ',],
self.parameters)))) self.parameters))))
) )