In python (and some other languages) I have learned, that the name of a class should be written in small letters except for the first letter of each word, which should be a capital letter. Example:
class FooBar:
...
A class should go in a file, named the same as the class. In this example it would be a file foobar.py. If I want to import the class foo somewhere I have to do this:
from foobar import FooBar
This convention confuses me a little. My intuition tells me, that if the filename indicates a class, it should be written with the first letter in capitals, too, like FooBar.py. This doesn’t look pretty in file names. Perhaps someone could tell me what is the standard convention for this?
I hope I made my question understandable. 🙂
What you have presented is the standard convention.
(Python Style Guide)
See e.g.
(which, incidentally, was ConfigParser in Python 2.x but changed to be lowercase in 3.x).