diff --git a/src/readability/putting_type_information_in_a_variable_name.rst b/src/readability/putting_type_information_in_a_variable_name.rst index e2cafa2..ddd25d3 100644 --- a/src/readability/putting_type_information_in_a_variable_name.rst +++ b/src/readability/putting_type_information_in_a_variable_name.rst @@ -19,14 +19,14 @@ The code below demonstrates the dangers of variables whose names include type no Best practice ------------- -Remove type notation +Use type hint .................... Although the modifed code below does not fix the underlying problem of attempting to divide a number by a string, the code is generally less misleading, because there is no misleading description in the variable name ``n`` that ``n`` is a number. .. code:: python - n = "Hello, World!" + n: str = "Hello, World!" # still a problem, but less misleading now 4 / n