Re: Preferred style

RF <[email protected]> Wed, 21 Apr 2021 12:50:58 -0700 (PDT)
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
Hi Phil,

As a new Python coder, I'm struggling with coding format and structure 
also. When I look at coding examples, I see all kinds of formatting styles. 
I even see the same functions called with different number of arguments. 
Depends on what syntax you use. For a newbie it's extremely confusing. I'm 
sticking with using OOP format. It's a steep mountain to get over while 
learning Python but I think in the end, it will be worth the effort. A few 
light bulbs have gone off in my head as I work on my project and I'm slowly 
getting the big structural picture of how an OOP Python file works. 
Obviously, I have a long ways to go but I'm retired and have no time 
constraints so that is good.

On Wednesday, April 7, 2021 at 11:17:06 PM UTC-7 Phil wrote:

> Thank you for reading this.
>
> It's been quite some time since I've done anything with WxPython and 
> while looking through some of my old code for ideas I see that I have 
> copied many different styles over the years and now I'm wondering which 
> is preferred:
>
> wx.Frame.__init__(self, None, wx.ID_ANY, "Pointer Test", size=(300,300))
>
> or
>
> super(Mywin, self).__init__(parent, title=title, size=(500, 400))
>
> The WxPython books that I have are quite dated and I suppose super is 
> the more recent and the preferred method.
>
> And what about this with the window name here instead of in the line 
> beginning with "super"?
>
> app = wx.App()
> Mywin(None, 'Name_of_window')
> app.MainLoop()
>
> -- 
>
> Regards,
> Phil
>
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/811e41b1-b82b-4d8d-91ad-d20e7e4d6d98n%40googlegroups.com.