This is so because of the history of the python language. In the early versions of python, classes were defined using class A: . Then the implementation of python objects changed, mainly so that users could define subclasses of the builtin types like int, str, dict, list, etc.The 'new style' classes appeared and were defined using class A(object) . The first kind of definition was kept so that old python code could still run. You should always use new style classes in your code (some properties of the old style objects differ from the others)
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
Like when you want to create class that will create simple dialog and then call it from GUI you have created:
import wx
class Dialogi(wx.Dialog):
...........
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392