Re: subclass of object

2010-04-02 Thread Ethan Furman
Steve Holden wrote: Alf P. Steinbach wrote: * Jason Friedman: Hi, what is the difference between: def MyClass(object): pass and def MyClass(): pass If you really meant 'def', then the first is a routine taking one argument, and the second is a routine of no arguments. If you meant

Re: subclass of object

2010-04-02 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Jason Friedman: Hi, what is the difference between: def MyClass(object): pass and def MyClass(): pass If you really meant 'def', then the first is a routine taking one argument, and the second is a routine of no arguments. If you meant 'cla

Re: subclass of object

2010-04-02 Thread Steve Holden
Alf P. Steinbach wrote: > * Jason Friedman: >> Hi, what is the difference between: >> >> def MyClass(object): >> pass >> >> and >> >> def MyClass(): >> pass > > If you really meant 'def', then the first is a routine taking one > argument, and the second is a routine of no arguments. > > I

Re: subclass of object

2010-04-02 Thread Steve Holden
Jason Friedman wrote: > Hi, what is the difference between: > > def MyClass(object): > pass > > and > > def MyClass(): > pass In Python 3, nothing. In Python 2, the former gets you a subclass of object whereas the latter gets you an instance of , for compatib

Re: subclass of object

2010-04-02 Thread Alf P. Steinbach
* Jason Friedman: Hi, what is the difference between: def MyClass(object): pass and def MyClass(): pass If you really meant 'def', then the first is a routine taking one argument, and the second is a routine of no arguments. If you meant 'class' instead of 'def', then it depends o

subclass of object

2010-04-02 Thread Jason Friedman
Hi, what is the difference between: def MyClass(object): pass and def MyClass(): pass -- http://mail.python.org/mailman/listinfo/python-list