| Newsgroups |
gmane.comp.python.db.pysqlite.user |
| Message-ID |
<OF2B3C4C87.0D377778-ON8525721A.007886E6-8525721A.00789D06@bankofny.com> |
Below I meant to say modules not functions in the line
When you are in functions or a script self cannot be used.
So that should read
When you are in module or a script self cannot be used.
Thanks,
Greg Givler
Information Technology
Lockwood®
10 Valley Stream Parkway
Malvern, PA 19355
Phone: (484) 605-4826
Email: [email protected]
[email protected]
Sent by: To: "For users of the pysqlite database module." <pysqlite-IAPFreCvJWPBWskQ1e/[email protected]>
pysqlite-bounces@list cc: "For users of the pysqlite database module." <pysqlite-IAPFreCvJWPBWskQ1e/[email protected]>,
s.initd.org [email protected]
Subject: Re: [pysqlite] Please Explain This Error
11/02/2006 04:54 PM
Please respond to
"For users of the
pysqlite database
module."
As to when and when not to use self.
If you are in a class, self is needed, plus you need to pass self into
your function.
When you are in functions or a script self cannot be used.
That is the basic rule of thumb that I use, but I also tend to use
classes, modules that are not declared as classes do not need the self,
at least I don't think they are, I tend to put it in or leave it out and
only change it when the compiler/interpreter complains :)
Thanks,
Greg Givler
Information Technology
Lockwood®
10 Valley Stream Parkway
Malvern, PA 19355
Phone: (484) 605-4826
Email: [email protected]
Rich Shepard
<rshepard@appl-ecosys To: "For users
of the pysqlite database module." <pysqlite-IAPFreCvJWPBWskQ1e/[email protected]>
.com> cc:
Sent by: Subject: Re:
[pysqlite] Please Explain This Error
pysqlite-bounces@list
s.initd.org
11/02/2006 04:26 PM
Please respond to
"For users of the
pysqlite database
module."
On Thu, 2 Nov 2006, [email protected] wrote:
> Just saw you bug, you have self.cur, then you say cur.fetchone() it
> should be self.cur.fetchone()
Excellent suggestion, Greg. But, cur.fetchone() is on line 129 (now)
and
the error is still on the line above with the 'self.cur.execute(...'.
I think that I tried that, too, before writing. I'm still getting
used to
knowing where I need to specify the specific object using 'self' and
when I
don't.
Rich
--
Richard B. Shepard, Ph.D. | The Environmental
Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax:
503-667-8863
_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please call the help desk at ext 4850
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please call the help desk at ext 4850
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________