[PEAK] The road to PyProtocols 1.0
Phillip J. Eby
pje at telecommunity.com
Sun May 30 13:42:49 EDT 2004
At 01:26 AM 5/30/04 -0500, Ian Bicking wrote:
>On May 30, 2004, at 12:43 AM, Phillip J. Eby wrote:
>>* Raise 'AdaptationFailure' instead of 'NotImplementedError'.
>>'AdaptationFailure' should subclass 'NotImplementedError' and 'TypeError'.
>>
>>* Check if anybody's using the 'factory' argument to 'adapt()', and if
>>not, get rid of it.
>>
>>* If 'factory' isn't used anywhere, consider ditching the second
>>parameter passed to adapters. That is, instead of calling
>>'someadapter(ob,proto)', just call 'someadapter(ob)'. This would give
>>PyProtocols adapters the same calling signature as e.g. Zope adapters.
>
>I am in FormEncode, but maybe I shouldn't be. Basically I allow objects
>to either provide an attribute, or an adapter, and lazily I've only ended
>up using attributes -- i.e., the factory gets ob.validator instead of
>actually registering an adapter for ob -> IValidator.
>Frankly I still don't know what I'm doing with interfaces and adapters, or
>how they should really fit into the system, so I've fumbled around with
>different ways of using it.
I'd take a look at it for you, but I'd have to install Subversion
first. :) You don't happen to have a ViewCVS for it somewhere, do you?
More information about the PEAK
mailing list