Hi Manav,

the final question did touch SQLAlchemy: the one about expiring and 
expunging.

1. "expiring an object creates a weak reference" - this is inaccurate. All 
object references held by the the session (except for objects whose 
addition, deletion or attribute change is not yet flushed) are weak 
references in the first place, 
see http://docs.sqlalchemy.org/en/latest/orm/session.html#session-attributes 
and expiring an object just marks its attributes out of date, it does not 
change the session's reference to the object itself

2. "Does expunging an object do the same" - expunging an object means the 
session no longer holds a reference (weak or otherwise) to that object. But 
the reference was weak in the first place (unless the object was in new, 
dirty or deleted), so expunging neither helps nor hurts in getting the 
object collected.

Your other questions do not involve SQLAlchemy, and that's why nobody here 
is answering them. You might find some other group where questions about 
python basics and process memory management are in scope ... but the One 
True Way to learn these things is to grit your teeth and google and read. 
That may be more work than you were hoping, but such is life. :) Also, this 
talk is 
good: 
http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-dude-where-s-my-ram-a-deep-dive-into-how-python-uses-memory-4896725

- Gulli

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/B1OSJv01mSoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to