> It's probably best if you use separate cursors anyway. Say you have
> two methods with a shared cursor:
>
> def iter_table_a(self):
> self.cursor.execute("SELECT * FROM TABLE_A")
> yield from self.cursor
>
> def iter_table_b(self):
> self.cursor.execute("SELECT *
On Thu, Dec 27, 2012 at 7:44 AM, Joseph L. Casale
wrote:
> I am writing a class to provide a db backed configuration for an application.
>
> In my programs code, I import the class and pass the ODBC params to the
> class for its __init__ to instantiate a connection.
>
> I would like to create a fu
>Have the method yield instead of returning:
Thanks, that was simple, I was hung up on implementing magic methods.
Thanks for the pointers guys!
jlc
--
http://mail.python.org/mailman/listinfo/python-list
"Joseph L. Casale" wrote in message
news:mailman.1346.1356619576.29569.python-l...@python.org...
I am writing a class to provide a db backed configuration for an
application.
In my programs code, I import the class and pass the ODBC params to the
class for its __init__ to instantiate a conne
Joseph L. Casale wrote:
> I am writing a class to provide a db backed configuration for an
> application.
>
> In my programs code, I import the class and pass the ODBC params to the
> class for its __init__ to instantiate a connection.
>
> I would like to create a function to generically access