[ python-Bugs-1243553 ] pydoc on cgi.escape lacks info that are in www docs
SourceForge.net
noreply at sourceforge.net
Tue Aug 2 04:54:08 CEST 2005
Bugs item #1243553, was opened at 2005-07-23 07:33
Message generated for change (Comment added) made by montanaro
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1243553&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Documentation
Group: None
Status: Open
>Resolution: Fixed
Priority: 5
Submitted By: Nikos Kouremenos (nkour)
>Assigned to: Skip Montanaro (montanaro)
Summary: pydoc on cgi.escape lacks info that are in www docs
Initial Comment:
WWW:
escape( s[, quote])
Convert the characters "&", "<" and ">" in string s
to HTML-safe sequences. Use this if you need to display
text that might contain such characters in HTML. If the
optional flag quote is true, the double-quote character
(""") is also translated; this helps for inclusion in
an HTML attribute value, as in <A HREF="...">. If the
value to be quoted might include single- or
double-quote characters, or both, consider using the
quoteattr() function in the xml.sax.saxutils module
instead.
pydoc
cgi.escape = escape(s, quote=None)
Replace special characters '&', '<' and '>' by SGML
entities.
why? ;(
moreover pydoc doesn't even say what quote is!!
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2005-08-01 21:54
Message:
Logged In: YES
user_id=44345
I expanded the cgi.escape docstring a bit (v 1.84). In general though, the
online doc can't really be a complete substitute for the reference
documentation. It should be treated more as a hint for usage.
----------------------------------------------------------------------
Comment By: Nikos Kouremenos (nkour)
Date: 2005-07-24 08:20
Message:
Logged In: YES
user_id=865368
pterk, thank you
----------------------------------------------------------------------
Comment By: Peter van Kampen (pterk)
Date: 2005-07-24 07:55
Message:
Logged In: YES
user_id=174455
The documentation from pydoc is generated from doc-strings
in the python source. Not only does this limit what you can
do with it (hence the need for more elaborate
documentation), it is also reasonable that this
documentation remains terse. You should consider it more as
a quick reference in stead of full-on documentation.
I have submitted a small patch (1243910) to include a
comment in the doc-string about quote.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1243553&group_id=5470
More information about the Python-bugs-list
mailing list