Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] SQLAlchemy Has Annoyances



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.



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org