Re: New to Python: Features

From: Aaron Bingham (bingham_at_cenix-bioscience.com)
Date: 10/05/04


Date: Tue, 05 Oct 2004 09:02:20 +0200
To: Richard Blackwood <richardblackwood@cloudthunder.com>

Richard Blackwood wrote:

> Hi, I'm new to Python and I'd like to know if Python has the following
> support: *please answer to each individually, thanks*

...

>
> 31. Concepts of Protocols (whereby one may organize related methods
> into groups and check whether a particular object implements the
> methods within this protocol), or Interfaces similar to those in Java
> whereby classes or objects which implement the interface (sign the
> contract) must implement the methods and attributes as specified in
> the interface, and/or programming by contract such as in Eiffel (see:
> http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=595)

PyProtocols (http://peak.telecommunity.com/PyProtocols.html) might do
what you want.

Aaron



Relevant Pages

  • Re: dynamic type checking - a pauline conversion?
    ... to actually write the code in Java. ... Is the query handled ... One of the problems with Java typing is small differences in interfaces ... array iteration, List iteration, and database query result iteration all ...
    (comp.object)
  • Re: CLOS Properties Question
    ... In interfaces, you can declare methods, but you ... This mess was the result of the fact that interfaces ... > is even an OOPSLA or ECOOP paper published before the advent of Java ... > Back to the question what this all has to do with multiple inheritance: ...
    (comp.lang.lisp)
  • Re: Python vs C for a mail server
    ... that is mostly unnecessary with Python. ... > I don't have enough experience with languages that provide interfaces, ... > such as Java, to understand how useful they are, but it's my impression ... I can't comment on "most Java APIs", but if you look at established ...
    (comp.lang.python)
  • Re: Java "interface" vs. OO interface
    ... > I think Java uses interfaces instead of classes because the designers ... To think that the designers of Java and .NET couldn't figure out a good ... Enough for a language to adopt a new keyword ...
    (comp.object)
  • Re: MRO theory
    ... It creates a Python class to proxy any Java class or Java ... Java proxies go, when it creates a class it can have at most one ... The problem basically comes about because interfaces are not classes, ...
    (comp.lang.python)