[PEAK] The road to PyProtocols 1.0

Phillip J. Eby pje at telecommunity.com
Sun May 30 02:05:01 EDT 2004


At 01:43 AM 5/30/04 -0400, Phillip J. Eby wrote:
>Anything else?  Comments or questions, anyone?

I forgot to add:

* Add a "single-dispatch generic function" demo/example

* Consider changing "adapter algebra" to allow OR-ing adapters as well as 
chaining them, using some sort of implicative partial ordering.  This would 
allow (for example) substituting one adapter for another, by specifying 
that one adapter "is better than" another, but *without* using depth 
numbers.  Instead, an implication graph would be kept, and 
ambiguously-ordered adapters would be disallowed.  This needs some API 
design work, though.

* Add a 'protocols.tupleOf(*protocols)' type, for matching tuples of a 
given size and set of protocols.  E.g. 'protocols.tupleOf(int,str)' would 
match tuples whose first element is an 'int' and second element is a 
'str'.  (Note that this type is of very limited use without the ability to 
"OR" adapters, since multiple adaptations from the 'tuple' type are 
ambiguous in PyProtocols' current scheme.)

I think this now pretty much covers everything in my personal wishlist, and 
most of what everybody else has asked for.  Unless anybody has any other 
items to suggest?




More information about the PEAK mailing list