(template)
| 54 | |
| 55 | |
| 56 | def fstring(template): |
| 57 | parts = [] |
| 58 | for item in template: |
| 59 | match item: |
| 60 | case str() as s: |
| 61 | parts.append(s) |
| 62 | case Interpolation(value, _, conversion, format_spec): |
| 63 | value = convert(value, conversion) |
| 64 | value = format(value, format_spec) |
| 65 | parts.append(value) |
| 66 | return "".join(parts) |
searching dependent graphs…