Django: Meaning of leading underscore in list of tuples used to define choice fields?
Posted
by User
on Stack Overflow
See other posts from Stack Overflow
or by User
Published on 2010-06-03T08:12:54Z
Indexed on
2010/06/03
8:24 UTC
Read the original article
Hit count: 189
I've seen a few examples defining choice fields like so:
COUNTRIES = (
('fr', _('France')),
('de', _('Germany')),
...
)
(source: http://code.djangoproject.com/ticket/5446 Also see: http://djangosnippets.org/snippets/494/)
What is the meaning of the leading underscores? And why is the second value in the tuple even parenthesized?
© Stack Overflow or respective owner