Re: Is this Pythonic?



zen19725@xxxxxxxxx (phil hunt) writes:

>>It would (possibly) be more Pythonic to
>>define an interface instead,
>
> Does Python have the concept of an interface? When was that added?

It doesn't have one included, but there are at least two
implementations, zope.interface and PyProtocols (I'm sure google will
find you more on both of these).

--
... with these conditions cam the realisation that ... nothing
turned a perfectly normal healthy individual into a great political
or military leader better than irreversible brain damage.
-- The Hitch-Hikers Guide to the Galaxy, Episode 11
.



Relevant Pages

  • Re: Forth and Unix -- history
    ... Forth, as a language, gives you all the building blocks. ... So does FORTRAN, so does C, so does PERL, so does Python. ... to interface to some free library written in whatever language. ...
    (comp.lang.forth)
  • Re: UI toolkits for Python
    ... nowadays can offer a rich graphical interface, it can be quite difficult to manage state maintenance between the two components (web server, web client) in the system. ... As has already been said, with the adoption of standards like CSS2, it's even possible to make such stuff run across multiple browser platforms (at the moment, though, just try writing an interface that makes table rows appear and disappear in a cross-browser fashion: you'll find the stylesheet techniques you need to use for Mozilla and IE are very different). ... But this doesn't help you at all if you are trying to interface to Python logic. ... already a HTML and JavaScript driven server platform and know about problems with the back-button and sessions. ...
    (comp.lang.python)
  • Re: Newbie Q: Class Privacy (or lack of)
    ... In, Steve Jobless wrote: ... you'd need to customize some objects (including classes - Python classes ... users' code as long as the interface is compatible. ... to separate interface from implementation in Python. ...
    (comp.lang.python)
  • Re: Missing interfaces in Python...
    ... I see that Python is missing "interfaces". ... The concept of an interface ... is a key to good programming design in Java, ... get with interfaces in Java. ...
    (comp.lang.python)
  • Using Python with COM to communicate with proprietary Windows software
    ... log tool developed by another part of the company. ... Python to easily add log parsing and log presentation in different ... the COM interface. ... discovered that the Python client must also implement a COM server to ...
    (comp.lang.python)