[Zope3-dev] Re: New Pyskel changes

Stephan Richter srichter@cbu.edu
Tue, 9 Jul 2002 07:55:47 -0400


>  > I
> >
> > think that the auto-generated code looks really ugly now.
>
> How so?

Often interfaces are very "clean" and simple. I think having __doc__-copyin=
g=20
statements flying around everywhere makes is quiet a bit dirty looking. But=
=20
then I am the extreme case of having good-looking readable code. :-)

> Huh? What private methods do I expose? I have no idea what you're talking
> about.

Well, I was a little unclear. I was mainly referring to __doc__. Often=20
Interface implementations only deal with public methods and attributes and=
=20
are therefore very easy to read and understand for Python beginners. I thin=
k=20
the __doc__ attribute code makes it all much more confusing.

> > Could we change that back to the old way, or do you have a good reason
> > for changing this?
>
> I had recieved compaints about the old generated doc strings, which were
> useless and duplicated information in the comments.
>
> I added logic to copy doc strings from the interface. This has the
> advantage that implementation methods (and classes) have meaningful doc
> strings without duplication of code and rersulting inconsistency.
>
> Having said that, there are few tools that make use of doc strings, and
> those that do, parse the code rather than introspect on objects. Tools th=
at
> parse the code won't see the doc strings. So, given that, I'd be happy to
> eliminate the code that copies the doc strings.

Well, I really liked the version, where we refer back to the Interface (doc=
=20
strings like 'See Zope.App.RDB.ISQLCommand'). Notice that most documentatio=
n=20
tools would also parser the interfaces.=20

Regards,
Stephan
=2D-=20
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training