On 5/11/06, Michael Bayer <[EMAIL PROTECTED]> wrote:
the "threadlocal" mod
has been removed from the tutorial as well as all mention of it.

For the sake of the people like me who learned SQLAlchemy in the 0.1.x
series, or the people who prefer the thread-local style of session
management, I think it would be nice not to remove *every* mention of
the threadlocal mod from the tutorial. Instead, something like the
following could be added near the end (after the tutorial has taught
people to use explicit sessions):

"If you prefer to have one default session that all your objects are
associated with by default, then import the thread-local mod at the
start of your code. (Insert detailed instructions here). This will
give you one global session object, used automatically by all your
objects; or if your program uses multiple threads, one session per
thread."

My wording isn't the best, but you get the idea. That way the tutorial
can say, "We've shown you the explicit way to do it, which is best in
most cases; but here's a simpler approach that will work if you're not
doing anything too complicated." I know if I was writing toy code
trying to get used to SQLAlchemy, I'd probably prefer to let
SQLAlchemy handle sessions for me until I got used to the rest of the
code. I imagine others might be in the same boat. And by putting this
at the end of the tutorial rather than at the beginning, it can become
an optional postscript rather than making the learning curve steeper
at the front end.

--
Robin Munn
[EMAIL PROTECTED]
GPG key 0xD6497014
Rȧ�:&q�[���y�hv����^y�h��i��py����z�r���!���n}�h�ꮉ�%����ފ{^���y�^r薈2����쨺��m欉�ã
 塧HŞm*az����bq�b�t�����]5m�v����!xg��x��m���zV���ږF�����\�

Reply via email to