[Python-3000] Builtin iterator type

Jan Grant jan.grant at bristol.ac.uk
Mon Nov 20 10:39:37 CET 2006


On Sun, 19 Nov 2006, Bill Janssen wrote:

> > Java interfaces are very useful, however. Java programming seems to be 
> > less and less about inheritance and more and more about implementing 
> > interfaces; at least it does amongst Java programmers with taste :-)
> 
> It seems to me that that's where Python has a real advantage.  With
> real support for multiple inheritance, Python "interfaces" could be
> real classes (either like real Java classes or Java abstract classes),
> perhaps providing default implementations.  You get the goodness of
> mix-ins, along with interface communication.

True, but the enforced separation of implementation and interface is 
pretty useful. Having said that, nothing to stop people declaring a 
completely abstract interface class, subclassing that to provide a 
default implementation. Again, comes down to a question of taste on a 
case-by-case basis.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Lambda calculus? I hardly know 'er!


More information about the Python-3000 mailing list