PEP 484: Fix a typo in code example (GH-591)
This commit is contained in:
parent
a77cd1a99c
commit
941b0580b3
|
@ -342,7 +342,7 @@ Additionally, ``Any`` is a valid value for every type variable.
|
|||
Consider the following::
|
||||
|
||||
def count_truthy(elements: List[Any]) -> int:
|
||||
return sum(1 for elem in elements if element)
|
||||
return sum(1 for elem in elements if elem)
|
||||
|
||||
This is equivalent to omitting the generic notation and just saying
|
||||
``elements: List``.
|
||||
|
|
Loading…
Reference in New Issue