In string.codon you have included _ in punctuation.
Scenario when _ is not considered as punctuation :
As a separator for digits: In Python, you can use underscores to make large numbers more readable by separating the digits. For example, 1_000_000 is equivalent to 1000000.
As a throwaway variable: In Python, you can use _ as a throwaway variable when you don't care about the value of a variable. For example, you can use it as follows:
_, y = some_function_that_returns_a_tuple()
In this example, _ is used to ignore the first value returned by some_function_that_returns_a_tuple().
In internationalization and localization : In Python, _ is often used as a function or a module name in internationalization and localization. For example, the gettext module in Python uses _ as a function name to translate strings.
You can use _ as a valid variable name, and it will be treated like any other variable name.
In
string.codon
you have included_
in punctuation.Scenario when
_
is not considered as punctuation :As a separator for digits: In Python, you can use underscores to make large numbers more readable by separating the digits. For example, 1_000_000 is equivalent to 1000000.
As a throwaway variable: In Python, you can use _ as a throwaway variable when you don't care about the value of a variable. For example, you can use it as follows:
_, y =
some_function_that_returns_a_tuple()
In this example,
_
is used to ignore the first value returned bysome_function_that_returns_a_tuple()
.In
internationalization
andlocalization
: In Python,_
is often used as a function or a module name in internationalization and localization. For example, thegettext
module in Python uses_
as a function name to translate strings.You can use _ as a valid variable name, and it will be treated like any other variable name.