I have come across such a coding style for cases when a tuple is returned.
_, number_of_days_in_month = calendar.monthrange(year, month)
In this case monthrange
returns a tuple with two values: weekday of first day of the month and number of days in month.
Is this style acceptable? Is it described in some famous style guides like Google Python Style Guide?
What should I do if
_
is already occupied? For example, in Django it is used for translation like this:from django.utils.translation import ugettext as _ output = _("Welcome to my site.")