[Python] Is it considered bad practice to mix camel and snake case in Python? [closed]

Discussão em 'Python' iniciado por Stack, Setembro 25, 2024.

  1. Stack

    Stack Membro Participativo

    Is it ok to mix camel and snake case in Python? I have my class and variable names follow the camel case convention and function names follow snake case. Is this considered bad practice? Is it worthwhile going back and changing code (variable names only) to follow snake case?

    class MyClass:
    def __init__(self):
    self.testVariable1 = 0
    self.testVariable2 = 0

    def first_function(self):
    ......
    def second_function(self):
    ......

    Continue reading...

Compartilhe esta Página