9 Mar 2006 23:12
Refactoring the directive interface
Felix Wiemann <Felix.Wiemann <at> gmx.net>
2006-03-09 22:12:54 GMT
2006-03-09 22:12:54 GMT
(FYI, David and I have talked at PyCon about refactoring the directive
interface towards a more OO-oriented approach.)
I've created a directives branch::
svn diff svn+ssh://svn.berlios.de/svnroot/repos/docutils/branches/directives -r4375:HEAD
I have added a "parsers.rst.Directive" base class on the "directives"
branch. I didn't want to call it "parsers.rst.directives.Directive,
because I have the notion that the directives themselves are extensions
to reStructuredText (which just happen to be shipped with core Docutils)
and thus logically belong into a separate directory, whereas the
"Directive" interface is an extension point [1]_ which belongs to the
core of the reST parser. After all, states.py knows about that
interface.
David, could you please have a look at the code? If you think it's OK,
I'll refactor the rest of the directives.
.. [1] The term "extension point" is mentioned here:
http://www.acmqueue.org/modules.php?name=Content&pa=showpage&pid=286
--
--
For private mail please ensure that the header contains 'Felix Wiemann'.
"the number of contributors [...] is strongly and inversely correlated with the
number of hoops each project makes a contributing user go through." -- ESR
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
(Continue reading)
RSS Feed