3 ms·
Pretty straightforwardly: x: int = 0 This makes sense when you see that the variable production in the Python grammar [0] has been updated to essentially
by DonaldPShimoda 7y ago
Pretty straightforwardly:
x: int = 0
This makes sense when you see that the variable production in the Python grammar [0] has been updated to essentially read "either a lone variable or a variable with a type annotation". (I highlighted the relevant line of the grammar for you in the link.)
[0] https://github.com/python/cpython/blob/master/Grammar/Grammar#L53 https://github.com/python/cpython/blob/master/Grammar/Gramma...