[Python-3000] iostack and Oh Oh

Phillip J. Eby pje at telecommunity.com
Tue Dec 5 17:16:37 CET 2006

At 09:59 AM 12/5/2006 -0600, Guido van Rossum wrote:
>My point is that an interface can *document* (at least in English) a
>"contract" about the invariants between operations. While I'm not into
>enforcing or verifying such contracts, I'm very interested in
>documenting them. For example, something that has "mapping" behavior
>has a very different relationship between x[y] and "y in x" than
>something that has "sequence" behavior.

I assumed this didn't need answering.  If you're using the interface solely 
for documentation, then a namespace-oriented interface suffices to provide it.

>  If you see interfaces as
>*just* combinations of operations there is no way to put this

Ah.  I've been thinking of this as there being two different 'getitem' 
operations, like at the C level.

More information about the Python-3000 mailing list