contro opinion wrote:
>
>here is my haha class
>class haha(object):
> def theprint(self):
>print "i am here"
>
haha().theprint()
>i am here
haha(object).theprint()
>Traceback (most recent call last):
> File "", line 1, in
>TypeError: object.__new__() takes no parameters
>
>why
On Sun, Dec 30, 2012 at 10:36 PM, contro opinion wrote:
> here is my haha class
> class haha(object):
> def theprint(self):
> print "i am here"
>
haha().theprint()
> i am here
haha(object).theprint()
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: obje
On 12/31/2012 01:36 AM, contro opinion wrote:
> here is my haha class
You posted the same question twice before, and it was answered two hours
ago. Read the first thread, instead of starting spurious ones.
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2008-05-16 at 06:04 -0700, globalrev wrote:
> On 16 Maj, 13:54, Peter Otten <[EMAIL PROTECTED]> wrote:
> > Christian Heimes wrote:
> > > globalrev schrieb:
> > >> cust1 = customer.__init__('12',['1','435','2332'])
> >
> > > cust1 = customer('12',['1','435','2332'])
> >
> > ... and before th
globalrev a écrit :
On 16 Maj, 14:19, Bruno Desthuilliers wrote:
globalrev a écrit :
(snip)
def getMovies():
return self.movies
4/ Python has support for computed attributes, so you just don't need
these getters.
> when class =
> class customer:
Please, do yourself and the wor
globalrev wrote:
On 16 Maj, 14:19, Bruno Desthuilliers wrote:
globalrev a écrit :
wassup here?
7
Traceback (most recent call last):
File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
print cust1.getID()
AttributeError: 'NoneType' object has no attribute 'getID'
class custome
globalrev a écrit :
On 16 Maj, 14:19, Bruno Desthuilliers wrote:
globalrev a écrit :
(snip)
cust1 = customer.__init__('12',['1','435','2332'])
__init__ is automagically called on instanciation, so you don't have to
call it yourself. And FWIW, your __init__ returns None.
what should init re
On Fri, 2008-05-16 at 06:07 -0700, globalrev wrote:
> On 16 Maj, 14:19, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
> > globalrev a écrit :
> >
> > > wassup here?
> >
> > > 7
> >
> > > Traceback (most recent call last):
> > > File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
> > >
globalrev wrote:
> On 16 Maj, 13:54, Peter Otten <[EMAIL PROTECTED]> wrote:
>> Christian Heimes wrote:
>> > globalrev schrieb:
>> >> cust1 = customer.__init__('12',['1','435','2332'])
>>
>> > cust1 = customer('12',['1','435','2332'])
>>
>> ... and before that
>>
>> from customer import customer
>>
On 16 Maj, 14:19, Bruno Desthuilliers wrote:
> globalrev a écrit :
>
> > wassup here?
>
> > 7
>
> > Traceback (most recent call last):
> > File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
> >
> > print cust1.getID()
> > AttributeError: 'NoneType' object has no attribute 'getID'
On 16 Maj, 14:19, Bruno Desthuilliers wrote:
> globalrev a écrit :
>
> > wassup here?
>
> > 7
>
> > Traceback (most recent call last):
> > File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
> >
> > print cust1.getID()
> > AttributeError: 'NoneType' object has no attribute 'getID'
On 16 Maj, 13:54, Peter Otten <[EMAIL PROTECTED]> wrote:
> Christian Heimes wrote:
> > globalrev schrieb:
> >> cust1 = customer.__init__('12',['1','435','2332'])
>
> > cust1 = customer('12',['1','435','2332'])
>
> ... and before that
>
> from customer import customer
>
> Peter
why do i have to wri
globalrev a écrit :
wassup here?
7
Traceback (most recent call last):
File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
print cust1.getID()
AttributeError: 'NoneType' object has no attribute 'getID'
class customer:
1/ naming convention : class names should be CamelCased
Christian Heimes wrote:
> globalrev schrieb:
>> cust1 = customer.__init__('12',['1','435','2332'])
>
> cust1 = customer('12',['1','435','2332'])
... and before that
from customer import customer
Peter
--
http://mail.python.org/mailman/listinfo/python-list
globalrev schrieb:
> cust1 = customer.__init__('12',['1','435','2332'])
cust1 = customer('12',['1','435','2332'])
Christian
--
http://mail.python.org/mailman/listinfo/python-list
wassup here?
>>>
7
Traceback (most recent call last):
File "C:\Python25\myPrograms\netflix\netflix.py", line 22, in
print cust1.getID()
AttributeError: 'NoneType' object has no attribute 'getID'
>>>
class customer:
def __init__(self, ID, movies):
self.ID = ID
self.m
On 8/28/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Jorge Vargas wrote:
>
> > seems like a feature/bug of 2.5, why your learning a language with a
> > beta version?
>
> learning?
I'm sorry I though you where the original poster.
>
> (btw, the "c" in 2.5c1 means *release candidate*, not "beta").
Jorge Vargas wrote:
> seems like a feature/bug of 2.5, why your learning a language with a
> beta version?
learning?
(btw, the "c" in 2.5c1 means *release candidate*, not "beta").
--
http://mail.python.org/mailman/listinfo/python-list
On 8/28/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Duncan Booth wrote:
>
> > Yes, the first one is a syntax error because you aren't allowed empty
> > parentheses in a class statement
>
> however,
>
> $ python
> Python 2.5c1 /.../
> >>> class foo():
> ... pass
> ...
> >>> foo
>
> >>>
>
fegge a écrit :
> when i declare a class, is there difference between the below:
> class myClass():
> class myClass(threading.Thread)
>
If you don't know the answer to this, then it's time to read the fine
manual. Please come back when done.
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> Yes, the first one is a syntax error because you aren't allowed empty
> parentheses in a class statement
however,
$ python
Python 2.5c1 /.../
>>> class foo():
... pass
...
>>> foo
>>>
--
http://mail.python.org/mailman/listinfo/python-list
fegge wrote:
> when i declare a class, is there difference between the below:
> class myClass():
> class myClass(threading.Thread)
the former is a base class, the latter inherits behaviour from the
threading.Thread class.
*please* read the tutorial before proceeding.
--
http://mail.python.o
sorry ,look at this :
class myClass:
class myClass(threading.Thread):
--
http://mail.python.org/mailman/listinfo/python-list
fegge wrote:
> when i declare a class, is there difference between the below:
> class myClass():
> class myClass(threading.Thread)
>
Yes, the first one is a syntax error because you aren't allowed empty
parentheses in a class statement but the second one is a syntax error
because you don't have
when i declare a class, is there difference between the below:
class myClass():
class myClass(threading.Thread)
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
Wolfgang wrote:
Hi,
I am a newbie and have to modify some python moduls.
I get the followin error:
TypeError: __init__() takes exactly 3 arguments (2 given)
Here the code snippet:
class gXconv:
def __init__(self, pathValue):
self.pathValue=pathValue
self.__
Wolfgang wrote:
> Hi,
> I am a newbie and have to modify some python moduls.
> I get the followin error:
> TypeError: __init__() takes exactly 3 arguments (2 given)
>
> Here the code snippet:
> class gXconv:
> def __init__(self, pathValue):
> self.pathValue=pathValue
> self.__
Hi,
I am a newbie and have to modify some python moduls.
I get the followin error:
TypeError: __init__() takes exactly 3 arguments (2 given)
Here the code snippet:
class gXconv:
def __init__(self, pathValue):
self.pathValue=pathValue
self.__sections = {}
self.__spalten
28 matches
Mail list logo