Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Significance of double underscores in Python filename

Tags:

python

Other than for __init__.py files, do the leading and trailing double underscores have any significance in a file name? For example, is __model__.py in any way more significant than model.py?

like image 607
Matty Avatar asked Apr 02 '12 02:04

Matty


1 Answers

Double underscores in filenames other than __init__.py and __main__.py have no significance to Python itself, but frameworks may use them to indicate/identify various things.

like image 186
Ignacio Vazquez-Abrams Avatar answered Sep 19 '22 02:09

Ignacio Vazquez-Abrams