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
* 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
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
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
* 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
Hi, what is the difference between:
def MyClass(object):
pass
and
def MyClass():
pass
--
http://mail.python.org/mailman/listinfo/python-list