durusmail: quixote-users: Python Interfaces
Re: quixote: next step
2000-10-25
2000-10-25
Resend: Re: quixote: next step
2000-10-25
Re: quixote: next step
2000-10-26
2000-10-26
2000-10-26
Python Interfaces
2000-12-04
2000-12-04
Python Interfaces
Greg Ward
2000-12-04
On 04 December 2000, Michel Pelletier said:
> Many different types may implement the same interface, so I don't
> think it would be useful to assert a type in the interface.  Of
> course, as an application specification you may *require* only one
> type implement an interface; in that case you can tag the interface
> with a 'type' value and do your own checks:

I was thinking more about something to enforce the types of instance
attributes in a class.  On reflection, this is not appropriate for
interfaces -- after all, instance attributes are mostly about
implementation, not interface.

Stems from my current thinking/hacking on specifying/enforcing an object
schema for ZODB databases (or any other long-lived Python object graph,
for that matter).  I think it boils down to this: interfaces and class
definitions (an "object schema" is a set of "class definitions" in my
current thinking) are related, but not the same.  But you already knew
that, since it's in your document.  So never mind me...

        Greg


reply