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


Groups > comp.lang.python > #71154

Re: trailing underscores naming convention_

X-Received by 10.58.112.97 with SMTP id ip1mr4087564veb.32.1399614594128; Thu, 08 May 2014 22:49:54 -0700 (PDT)
X-Received by 10.182.229.4 with SMTP id sm4mr882obc.32.1399614593998; Thu, 08 May 2014 22:49:53 -0700 (PDT)
Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!ih12no1770183qab.1!news-out.google.com!gi6ni796igc.0!nntp.google.com!r10no2240257igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 8 May 2014 22:49:53 -0700 (PDT)
In-Reply-To <57d21b4f-10db-4fbf-82f4-d33250b14456@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=108.243.53.64; posting-account=BlPZ0QoAAAD1MM_gQHQx4_hLQYm0IH4t
NNTP-Posting-Host 108.243.53.64
References <57d21b4f-10db-4fbf-82f4-d33250b14456@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <57b0d9ec-b8a4-4021-b25f-422a9fe11529@googlegroups.com> (permalink)
Subject Re: trailing underscores naming convention_
From Metallicow <metaliobovinus@gmail.com>
Injection-Date Fri, 09 May 2014 05:49:54 +0000
Content-Type text/plain; charset=ISO-8859-1
X-Received-Bytes 2384
X-Received-Body-CRC 4131271897
Xref csiph.com comp.lang.python:71154

Show key headers only | 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