File: f_string.py

package info (click to toggle)
loguru 0.7.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,568 kB
  • sloc: python: 13,164; javascript: 49; makefile: 14
file content (21 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# fmt: off
import sys

from loguru import logger

logger.remove()
logger.add(sys.stderr, format="", colorize=True, backtrace=False, diagnose=True)


def hello():
    output = f"Hello" + f' ' + f"""World""" and world()


def world():
    name = "world"
    f = 1
    f"{name} -> { f }" and {} or f'{{ {f / 0} }}'


with logger.catch():
    hello()