[lxml-dev] lxml.html and forms

Stefan Behnel stefan_ml at behnel.de
Tue Jul 17 08:21:50 CEST 2007


Hi,

Ian Bicking wrote:
> Stefan Behnel wrote:
>>> OK, I guess that keyword argument should be available in all the parsing
>>> functions.
>>
>> "string" parsing functions. Sure.
> 
> I'm not sure how to do this.  lxml.etree.HTML doesn't take a base_url
> argument

It works for me in both trunk and html branch:

def HTML(text, _BaseParser parser=None, base_url=None):


> Also, why are all the signatures "..." in help?  E.g.,
> help(lxml.etree.HTML) gives "HTML(...)".  Is this a Pyrex thing? Perhaps
> fixable?  If not, it would be nice to give signature help in the
> docstrings.

Yes, that's a Pyrex (or rather C) thing. The signature is not visible in C
modules.

I tried to make Pyrex add signatures to the docstrings automatically, but that
turned out to be harder than I thought and I didn't have the time to get it
right since then. I attached a patch that gets you part of the way.

I started experimenting with epydoc and it can actually read a signature line
that you prepend to docstrings, so doing that would give us nicely formatted
HTML docs.

http://codespeak.net/lxml/dev/api/

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigs.patch
Type: text/x-diff
Size: 2188 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20070717/81639919/attachment.bin 


More information about the lxml-dev mailing list