pythonnaming-conventions

Are there any risks in Python if the module name and class name from inside had identical names?


I would like to know if there any risks to use the exact same name for module and a class from inside the module.


Solution

  • The PEP 8 says that modules should have short, all-lowercase names, while class names use the CapWords convention. So, if you have the same name for a module and a class, you're not following those style conventions.

    Technically, there's no risk at all.