[Zope-dev] improving the utility and adapter lookup APIs
me at rpatterson.net
Wed Nov 25 16:54:32 EST 2009
Marius Gedminas <marius at gedmin.as> writes:
> On Wed, Nov 25, 2009 at 01:29:25PM -0500, Tres Seaver wrote:
>> Matthew Wilkes wrote:
>> > On 2009-11-25, at 1601, Benji York wrote:
>> >> I'm not sure I like the following suggestion better than the above,
>> >> but throwing it out there anyway:
>> >> Multiadapter:
>> >> IFoo((x,y))
>> > I know it's probably a spurious use case, but what if I want to adapt
>> > a tuple?
>> I would agree that its completely spurious: I can't imagine wanting
>> that. I prefer the regularity in Benji's spelling over satisfying a
>> non-existing usecase.
> I am, in fact, adapting tuples for what I consider to be a good reason
> (pretty-printing arbitrary objects) in zodbbrowser.
Similarly, I've often sub-classed built-in types when using the ZCA such
that isinstance(obj, tuple) is True.
More information about the Zope-Dev