• alexdeathway@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    4 months ago

    First one are method name, second one are status name.

    
    def open_file_dialog(self):
           self.dialog_file_open = True
           pass
    
    

    Yoda level preference war.

    • Croquette@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      4 months ago

      I tend to add is to booleans toreally differentiate between a method name and a status.

      def open_file_dialog(self):
          self.dialog_file_is_open = True
          pass
      

      That way, it’s easier for my dumb brain to spot which is which at a glance.