Does a “with” statement support type hinting?

PEP 526, which has been implemented in Python 3.6, allows you to annotate variables. The variable used in a with statement can be annotated like this:

x: str
with example() as x:
    [...]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)