This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Python switch statement | |
Usage: | |
``` | |
from datetime import datetime | |
# import switch and case (below) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import suppress | |
from contextvars import ContextVar | |
FLEX_CONTEXT = ContextVar('flex_context', default={}) | |
class ContextManagerReentryError(Exception): | |
pass | |
class FlexContext: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import contextlib | |
import json | |
import os | |
import string | |
from collections import OrderedDict | |
from enum import Enum | |
from numbers import Number | |
from string import Template |