|
From: Artem Y. <ne...@gm...> - 2008-08-09 00:13:30
|
Yuri Takhteyev wrote: >> Or for any platform: >> easy_install http://splyer.com/markdown2.0-alpha.tar.gz >> easy_install elementtree >> > > That too, though if you are limited to python2.3, chances are you > don't have easy_install pre-installed. :) > Yep, forgot about it. For Windows it'll be quite simple, there are official binary installers. Also a lot of Linux distributions includes ElementTree in the repository. For instance for Debian/Ubuntu it'll be: apt-get install python-elementtree for BSD systems, i.e FreeBSD: cd /usr/ports/devel/py-elementtree; make install clean Fedora Core (and I suppose Red Hat too): yum install python-elementtree > >> What about AND_SUBSTITUTE ? I use it in some places instead of "&", now >> it's: >> AND_SUBSTITUTE = unichr(2) + unichr(4) + unichr(3) >> is it ok ? >> > > Just for the sake of consistency, I would make it STX+"amp"+ETX. And > I would call it AMPERSAND_SUBSTITUTE or AMP_SUBSTITUTE, since > AND_SUBSTITUTE can mean too many things. > Good idea, changed to AMP_SUBSTITUTE = STX+"amp"+ETX > Also, can you add more comments to the code? (I mean especially the > parts that you changed, though you are welcome to comment old code as > well.) > Added some more comments, and revisioned old ones, maybe later add some more. > Also, we had that discussion of recursion before. I am in principle > all for getting rid of recursion as Waylan was suggesting, but I think > considering the time constraints, perhaps it would be more practical > to cap recursion by simply breaking the input into chunks. This needs > to be done with a little bit of thought so that we don't break lists, > etc. into multiple chunks. However, I think it will be much easier > than trying to rewrite the current _processSection logic and it should > get us the same benefits in terms of performance. > If time permits, I'll try to do it extendable, if not - just get rid of recursion. |