[Discuss] SQLAlchemy Has Annoyances
    Richard Pieri 
    richard.pieri at gmail.com
       
    Thu Feb  5 14:59:32 EST 2015
    
    
  
On 2/5/2015 1:45 PM, Mike Small wrote:
> So in his case could he use only one class and map it to many tables?
In principle, sure. You can have many references to an object. In 
practice, I don't know how SQAlchemy does things so I cannot say if it 
allows this.
Python's garbage collector is thorough. An object with zero references 
is almost immediately removed from the interpreter's allocated memory. 
Gone. No shadows. No replicas. Gone is gone.
> Now that I think about it, it's kind of puzzling to remove a method or
> attribute from a class definition.  E.g. if you remove an attribute from
> the class definition after you've created an instance of that class with
> a value for that attribute, what kind of object is that object now? Is it
It doesn't matter what kind of object it is. It might matter if you were 
writing C++ where you have to manage memory yourself. This is Python. 
Let Python handle managing it's memory.
-- 
Rich P.
    
    
More information about the Discuss
mailing list