|
180 | 180 | '<2.0, 2.09439..., 2.18627..., 3.92699...>' |
181 | 181 | >>> format(Vector([2, 2, 2, 2]), '.3eh') |
182 | 182 | '<4.000e+00, 1.047e+00, 9.553e-01, 7.854e-01>' |
183 | | - >>> format(Vector([0, 1, 0, 1]), '0.5fh') |
184 | | - '<1.41421, 1.57080, 0.78540, 1.57080>' |
| 183 | + >>> format(Vector([0, 1, 0, 0]), '0.5fh') |
| 184 | + '<1.00000, 1.57080, 0.00000, 0.00000>' |
185 | 185 | """ |
186 | 186 |
|
187 | 187 | from array import array |
@@ -269,8 +269,8 @@ def __format__(self, fmt_spec=''): |
269 | 269 | else: |
270 | 270 | coords = self |
271 | 271 | outer_fmt = '({})' # <6> |
272 | | - components = (format(c, fmt_spec) for c in coords) |
273 | | - return outer_fmt.format(', '.join(components)) # <7> |
| 272 | + components = (format(c, fmt_spec) for c in coords) # <7> |
| 273 | + return outer_fmt.format(', '.join(components)) # <8> |
274 | 274 |
|
275 | 275 | @classmethod |
276 | 276 | def frombytes(cls, octets): |
|
0 commit comments