> Yes. That is the somewhat unfortunate difference between new-style and
> old-style classes.
> Use new-style if you can, and that means that "object" must be part of the
> inheritance graph.
...
>You are wrong for Python 2.X, but right for Python 3 where old-style
>
>classes are gone f
>
> Yes. That is the somewhat unfortunate difference between new-style and
> old-style classes. Use new-style if you can, and that means that "object"
> must be part of the inheritance graph.
>
...
> You are wrong for Python 2.X, but right for Python 3 where old-style
> classes are gone for good.
>
> Yes. That is the somewhat unfortunate difference between new-style and
> old-style classes. Use new-style if you can, and that means that "object"
> must be part of the inheritance graph.
>
...
> You are wrong for Python 2.X, but right for Python 3 where old-style
> classes are gone for good.
Thanks to everyone for your help.
I am able to use array of structure (here Event is a class) in the following
manner. But here I am fixing the array index as 4. Is there any easy way to
keep it appending dynamically.
self.event = [Event() for x in range(4)] # Event is a class as posted in
origi
Arnaud Delobelle <[EMAIL PROTECTED]> writes:
> "Alex Gusarov" <[EMAIL PROTECTED]> writes:
>
>>> class Event(object):
>>>
>>> Always subclass object, unless you have a very compelling reason not to,
>>> or you are subclassing something else.
>>>
>>
>> I've thought that if I write
>>
>> class Event
"Alex Gusarov" <[EMAIL PROTECTED]> writes:
>> class Event(object):
>>
>> Always subclass object, unless you have a very compelling reason not to,
>> or you are subclassing something else.
>>
>
> I've thought that if I write
>
> class Event:
> pass
>
> , it'll be subclass of object too, I was
Alex Gusarov schrieb:
class Event(object):
Always subclass object, unless you have a very compelling reason not to,
or you are subclassing something else.
I've thought that if I write
class Event:
pass
, it'll be subclass of object too, I was wrong?
Yes. That is the somewhat unfortu
> class Event(object):
>
> Always subclass object, unless you have a very compelling reason not to,
> or you are subclassing something else.
>
I've thought that if I write
class Event:
pass
, it'll be subclass of object too, I was wrong?
--
Best regards, Alex Gusarov
--
http://mail.python.
On Wed, 2008-05-28 at 09:31 -0400, Alok Kumar wrote:
> I am getting following error when tried as you suggested.
>
> self.event = [] #Create an empty list, bind to the name "event" under
> the "self" namespace
>self.event.append(Event()) #Create an event object and
> append to the e
I am getting following error when tried as you suggested.
self.event = [] #Create an empty list, bind to the name "event" under the
"self" namespace
self.event.append(Event()) #Create an event object and append
to the end of the list
*class Event():
^
SyntaxError: in
while traversing I get out of index error as mentioned below.
class EventTimeFilter:
def __init__(self):
* self.event = [Event()]*
def populateScheduleData(self):
self.doc = libxml2.parseFile(self.FILENAME)
for eachcamera in
self.doc.xpathEval('SetDeviceConfigura
>self.event[] = Event() *# Seems this is not allowed ?? *
>
self.event = [Event()]
- Casey
--
http://mail.python.org/mailman/listinfo/python-list
I don't know if this will go through (my posts seem to have become blocked
lately), but I'll give it a shot anyhow.
You seem to be under a misconception that a python list is similar to a list
in say, Java or other languages that have a rigid idea of variables and
types. In python, a list is a li
13 matches
Mail list logo