I am new to Python and I have been reading both the online documentation and (trying) to follow PEP 0008 to have a good Python code style. I am curious about the code segment I found in the official Python docs while studying about the re library:
import collections
Token = collections.namedtuple('Token', ['typ', 'value', 'line', 'column'])
I cannot understand why the Token
variable is named with a first letter capitalised; I have read through the PEP 0008 and there is no reference for it for what I have seen. Should it not be token
instead or TOKEN
if it was a constant (which for all I know it is not)?