Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6008
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: TK program problem |
| Date | 2011-05-22 17:17 -0400 |
| References | <9f91909a-ce08-47dd-81d3-e7cf2edad3b6@h12g2000pro.googlegroups.com> <ir7shb$dd8$1@solani.org> <fe3b6da7-4e9a-4226-bc6e-a271714c2df8@e17g2000prj.googlegroups.com> <mailman.1891.1306024415.9059.python-list@python.org> <42561028-39ce-4543-8e3c-b021e3a2b067@34g2000pru.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1930.1306099067.9059.python-list@python.org> (permalink) |
On 5/21/2011 10:20 PM, bvdp wrote: > >> One of the purposes and advantages of Python 3 is having only one class >> system. Best to always use new-style classes in Python 2.2+ unless you >> understand and need old-style classes (and need should be never for most >> people). >> > > Thanks for this. I'll keep it in mind! > > One thing I really don't understand ... is there a difference between > the old/new forms: > > class foo: > class foo(): > > In cases where I've played with them, they _appear_ to work the same? I believe they are. Same is true in 3.x except that the result in a new-style class. > Also, where does one find the magic that says that for a tkinter class > you should use: > > class foo(object): Perhaps nowhere. It may have been an unintended side-effect of the change in callable check, or intentional but not documented. > Not really sure where "object" comes from. It is the base class of all (new-style) classes. >>> object() <object object at 0x00EB6668> -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 11:03 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 13:20 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 15:12 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 16:33 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:07 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 17:29 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:34 -0700
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-20 16:37 -0700
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:07 -0700
Re: TK program problem Peter Otten <__peter__@web.de> - 2011-05-21 10:18 +0200
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:03 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-21 20:33 -0400
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 19:20 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-22 17:17 -0400
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-22 07:03 -0700
Re: TK program problem Chris Angelico <rosuav@gmail.com> - 2011-05-23 00:25 +1000
csiph-web