Consider having obvious interfaces tooPython offers any number of ways to create very Pythonic
interfaces to your objects, natural ways of getting various
bits of information out of them. For an example that is fresh
to my mind, the The M2Crypto example also illustrates the problem with this way of
creating interfaces: it is not necessarily very intuitive to people
using your code. The So I would like to suggest that you consider the merits of giving your
objects obvious interfaces too. Adding a (I don't know about other people, but I use introspection in the
interactive interpreter a lot when I am trying to figure out how to bang
together some code. I also tend to skip entirely over the Having said this, I will admit that in retrospect I have committed my
share of clever, Pythonic, and not all that obvious interfaces in my own
code. I'll have to remember this the next time I am tempted to add a
(I don't think that docstrings are entirely the answer. Again, perhaps
it's just me but I'm more likely to look first at |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |