Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python underscore function name

Tags:

People also ask

What does _ and __ mean in Python?

Enforced by the Python interpreter. Double Leading and Trailing Underscore( __var__ ): Indicates special methods defined by the Python language. Avoid this naming scheme for your own attributes. Single Underscore( _ ): Sometimes used as a name for temporary or insignificant variables (“don't care”).

What is __ called?

An underscore, _, also called an underline, low line or low dash, is a line drawn under a segment of text.

What is _ in Python class?

The python interpreter stores the last expression value to the special variable called '_'. This feature has been used in standard CPython interpreter first and you could use it in other Python interpreters too.

What is __ variable __ in Python?

A Python variable is a symbolic name that is a reference or pointer to an object. Once an object is assigned to a variable, you can refer to the object by that name. But the data itself is still contained within the object.


I was reading the django article on form validatin here and i came across this

ValidationError(_('Invalid value'), code='invalid')

my question is what does the _('Invalid value') does?