On Aug 3, 11:00 pm, Dave Angel wrote:
> Simon wrote:
> > On Aug 2, 5:51 am, Dave Angel wrote:
>
> >>
> >> I don't understand your comparison to Foxpro. read on.
>
> >> As your code was last posted, you don't need a return value from
> >> init_Exec() Every function that doesn't have an explicit
Dennis Lee Bieber wrote:
On Mon, 03 Aug 2009 23:00:13 -0400, Dave Angel
declaimed the following in gmane.comp.python.general:
To throw away the result of an expression in Python is even easier.
Just don't use it.
func1() and func2()
is a valid expression whose result is not used.
Simon wrote:
On Aug 2, 5:51 am, Dave Angel wrote:
I don't understand your comparison to Foxpro. read on.
As your code was last posted, you don't need a return value from
init_Exec() Every function that doesn't have an explicit return will
return None. And None is interpreted as False in
On Aug 2, 5:51 am, Dave Angel wrote:
> Simon wrote:
> > Okay I will fix my code and include "self" and see what happens. I
> > know I tried that before and got another error which I suspect was
> > another newbie error.
>
> > The idea behind the init_Pre is that I can put custom code here to
> >
Simon wrote:
Okay I will fix my code and include "self" and see what happens. I
know I tried that before and got another error which I suspect was
another newbie error.
The idea behind the init_Pre is that I can put custom code here to
customize the __init__ instead of creating a new subclass.
Okay I will fix my code and include "self" and see what happens. I
know I tried that before and got another error which I suspect was
another newbie error.
The idea behind the init_Pre is that I can put custom code here to
customize the __init__ instead of creating a new subclass. This kind
of h
Nat Williams wrote:
As MRAB described, ALL instance methods need to accept 'self' as a first
parameter, as that will be passed to them implicitly when they are called.
This includes __init__. The name 'self' is just a commonly accepted
convention for the name of the instance object passed to met
En Sat, 01 Aug 2009 00:13:05 -0300, Nat Williams
escribió:
One other thing. I'm a little confused by the first line of
dcObject.__init__:
self.init_Pre() and self.init_Exec()
I suspect this does not do what you think it does. init_Pre and
init_Exec
will both be called by this expression
En Fri, 31 Jul 2009 22:53:47 -0300, Simon
escribió:
So should the dcObject class include the "self" as well since I have
not defined an __init__ method in dcCursor?
Every method that you define takes "self" as its first argument.
Every method that you want to call on the current instance mu
As MRAB described, ALL instance methods need to accept 'self' as a first
parameter, as that will be passed to them implicitly when they are called.
This includes __init__. The name 'self' is just a commonly accepted
convention for the name of the instance object passed to methods. You don't
have
Hi
So should the dcObject class include the "self" as well since I have
not defined an __init__ method in dcCursor?
Simon
--
http://mail.python.org/mailman/listinfo/python-list
Simon wrote:
Hi
I want to create an instance of dcCursor which inherits from
dcObject. When I run the following code it gives the error shown.
Can some explain to me what is wrong? I have included the dcObject.py
and dcCursor.py below.
import dcObject
import dcCursor
x = dcCursor.dcCursor()
Hi
I want to create an instance of dcCursor which inherits from
dcObject. When I run the following code it gives the error shown.
Can some explain to me what is wrong? I have included the dcObject.py
and dcCursor.py below.
>>>import dcObject
>>> import dcCursor
>>> x = dcCursor.dcCursor()
Traceb
13 matches
Mail list logo