Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71154

Re: trailing underscores naming convention_

Newsgroups comp.lang.python
Date 2014-05-08 22:49 -0700
References <57d21b4f-10db-4fbf-82f4-d33250b14456@googlegroups.com>
Message-ID <57b0d9ec-b8a4-4021-b25f-422a9fe11529@googlegroups.com> (permalink)
Subject Re: trailing underscores naming convention_
From Metallicow <metaliobovinus@gmail.com>

Show all headers | View raw


I guess to be more clear here is a small code snippet that shows what is happening more readably. Hence the underscores question.



class MainAuiManager(aui.AuiManager):
    def __init__(self, managed_window=None, agwFlags=0)
        aui.AuiManager.__init__(self, managed_window, agwFlags)

        ## self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick)
        self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick_)
        self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick__)
        self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick___)
        # etc...

    ## def OnLeftDClick(self, event):
    ##     """This will override the aui.AuiManager.OnLeftDClick event method."""
    ##     event.Skip()
    ##     print('OnLeftDClick')

    def OnLeftDClick_(self, event):
        """This will extend the aui.AuiManager.OnLeftDClick event method."""
        event.Skip()
        print('OnLeftDClick_')

    def OnLeftDClick__(self, event):
        """This will extend the aui.AuiManager.OnLeftDClick event method."""
        event.Skip()
        print('OnLeftDClick__')

    def OnLeftDClick___(self, event):
        """This will extend the aui.AuiManager.OnLeftDClick event method."""
        event.Skip()
        print('OnLeftDClick___')

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

trailing underscores naming convention_ Metallicow <metaliobovinus@gmail.com> - 2014-05-08 20:28 -0700
  Re: trailing underscores naming convention_ Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-08 22:24 -0600
    Re: trailing underscores naming convention_ Metallicow <metaliobovinus@gmail.com> - 2014-05-08 22:03 -0700
  Re: trailing underscores naming convention_ Metallicow <metaliobovinus@gmail.com> - 2014-05-08 22:49 -0700
    Re: trailing underscores naming convention_ Peter Otten <__peter__@web.de> - 2014-05-09 11:10 +0200
      Re: trailing underscores naming convention_ Metallicow <metaliobovinus@gmail.com> - 2014-05-09 03:22 -0700
        Re: trailing underscores naming convention_ Peter Otten <__peter__@web.de> - 2014-05-09 13:49 +0200
        Re: trailing underscores naming convention_ "Albert Visser" <albert.visser@gmail.com> - 2014-05-09 16:24 +0200
    Re: trailing underscores naming convention_ Michael Torrie <torriem@gmail.com> - 2014-05-09 10:35 -0600
      Re: trailing underscores naming convention_ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-10 00:00 +0000

csiph-web