Ian Bicking: the old part of his blog


This adaptation thing might be getting out of hand ;) Really, context.locate(ISession) is just like attribute access, except the attributes themselves have namespaces (i.e., ISession belongs to a namespace, where 'ISession' wouldn't). I'm not sure how I feel about that. (And why context.locate(ISession) instead of ISession(context)?) I thought that adaptation and traversal overlap considerably, though I'm still not sure what it means or how it helps. Why context.remember(data, ISomeData) instead of context.someData = data? Except maybe the namespace thing, are namespaces really that important?

Anyway, I'm glad to see that thread-local data is going to be built in to Python. That way at least I can implement a simpler thread-local system, knowing that even if the particular techniques I use aren't perfect there will be a well-supported, analogous technique in the future. (I don't want to deal with a C extension at the moment.)
Comment on Dealing with Context
by Ian Bicking