Dennis Lee Bieber wrote:
On Mon, 03 Aug 2009 23:00:13 -0400, Dave Angel da...@ieee.org
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
On Aug 3, 11:00 pm, Dave Angel da...@ieee.org wrote:
Simon wrote:
On Aug 2, 5:51 am, Dave Angel da...@ieee.org wrote:
snip
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
On Aug 2, 5:51 am, Dave Angel da...@ieee.org 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:
On Aug 2, 5:51 am, Dave Angel da...@ieee.org wrote:
snip
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
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.
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
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
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()
Traceback
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
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
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
En Fri, 31 Jul 2009 22:53:47 -0300, Simon dciphercomput...@gmail.com
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
En Sat, 01 Aug 2009 00:13:05 -0300, Nat Williams nat.willi...@gmail.com
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
13 matches
Mail list logo