BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] SQLAlchemy Has Annoyances
- Subject: [Discuss] SQLAlchemy Has Annoyances
- From: richard.pieri at gmail.com (Richard Pieri)
- Date: Thu, 05 Feb 2015 14:59:32 -0500
- In-reply-to: <li6egq49oyj.fsf@panix5.panix.com>
- References: <54D2B2FA.4000000@borg.org> <54D2C0AC.7060101@gmail.com> <li6r3u49ug8.fsf@panix5.panix.com> <54D3AF77.2010406@gmail.com> <li6egq49oyj.fsf@panix5.panix.com>
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.
- References:
- [Discuss] SQLAlchemy Has Annoyances
- From: kentborg at borg.org (Kent Borg)
- [Discuss] SQLAlchemy Has Annoyances
- From: richard.pieri at gmail.com (Richard Pieri)
- [Discuss] SQLAlchemy Has Annoyances
- From: smallm at panix.com (Mike Small)
- [Discuss] SQLAlchemy Has Annoyances
- From: richard.pieri at gmail.com (Richard Pieri)
- [Discuss] SQLAlchemy Has Annoyances
- From: smallm at panix.com (Mike Small)
- [Discuss] SQLAlchemy Has Annoyances
- Prev by Date: [Discuss] SQLAlchemy Has Annoyances
- Next by Date: [Discuss] SQLAlchemy Has Annoyances
- Previous by thread: [Discuss] SQLAlchemy Has Annoyances
- Next by thread: [Discuss] SQLAlchemy Has Annoyances
- Index(es):