PEP 245

Remco Gerlich scarblac at pino.selwerd.nl
Thu Apr 5 03:49:06 EDT 2001


Remco Gerlich <scarblac at pino.selwerd.nl> wrote in comp.lang.python:
> Clark C. Evans <cce at clarkevans.com> wrote in comp.lang.python:
> > > It is clear to me that either I am the only one who things 
> > > that interfaces, at least in the proposed form, are next to 
> > > useless in Python, or those who agree with me do not read the 
> > > news group, or simply don't care enough to reply.
> > 
> > Some mechanism is needed to identify an object as
> > an implementer of a particular protocol, searching
> > for the existance of "getitem" and the like seems
> > like very poor practice.
> 
> Common practice in Python is to do not even that, but just use the object as
> given. If it doesn't have the methods then there will be an exception.
> Heavy unit testing is necessary anyway.
> 
> Even checking for existence of getitem and so on seems too rigorous to me to
> use in every day Python. That's silly, you don't even normally check if your
> input is actually an integer.
> 
> I haven't actually followed the PEP discussion, but no, some formal
> definition of interface may sound like a cool idea, just not one that should
> have anything to do with Python...
 
I just woke up and wrote something that looks too much like FUD. Never mind,
I don't really know what I'm talking about, just typing up a first feeling
about something, move along, nothing to see...

I'll try to wake up and do some investigating first...

-- 
Remco Gerlich



More information about the Python-list mailing list