On 12Oct2018 13:28, Ryan Johnson wrote:
Thanks for the clarification.
If I am creating a class variable, are you suggesting I perform the “if it
exists, great, otherwise make it” logic in the __init__ block or in the class
definition block? Will that even run in a class definition?
The clas
AM
To: python-list@python.org
Subject: Re: Single DB connection during class's lifetime. Metaclass,singleton
and __new__() examples and references.
On 12/10/2018 01:19, Ryan Johnson wrote:
> I am working on using mysql.connector in a class and have found an example of
> how to crea
On 12/10/2018 01:19, Ryan Johnson wrote:
I am working on using mysql.connector in a class and have found an example of
how to create a single connection that spans the lifetime of all instances of
the class:
https://softwareengineering.stackexchange.com/a/358061/317228
however, I do not under
Ryan Johnson writes:
> I am working on using mysql.connector in a class and have found an example of
> how to create a single connection that spans the lifetime of all instances of
> the class:
>
> https://softwareengineering.stackexchange.com/a/358061/317228
>
> however, I do not understand a