[Trac-tickets] [The Trac Project] #2761: Typos in trac.web.href.Href docstring

The Trac Project noreply at edgewall.com
Tue Feb 14 15:56:15 CST 2006


#2761: Typos in trac.web.href.Href docstring
-------------------------------------------+--------------------------------
 Reporter:  Tim Hatch <trac at timhatch.com>  |       Owner:  jonas
     Type:  defect                         |      Status:  new  
 Priority:  low                            |   Milestone:       
Component:  general                        |     Version:  devel
 Severity:  minor                          |    Keywords:       
-------------------------------------------+--------------------------------
 Patch included for three minor docstring changes:

  1. First has a title that mentions how it behaves with None as a
 positional argument... yet there's no None.
  2. In Href.something, Href is a class instance, not a function.
  3. This was originally phrased as if introduced for the first time, yet
 it is already mentioned in lines 44-50.  Personally I would rather merge
 the two mentions into one, lines 102-109 don't really say anything that
 44-50 don't already.

 {{{
 Index: trac/web/href.py
 ===================================================================
 --- trac/web/href.py    (revision 2905)
 +++ trac/web/href.py    (working copy)
 @@ -38,11 +38,11 @@

      If a positional parameter evaluates to None, it will be skipped:

 -    >>> href('ticket', 540, 'attachment')
 +    >>> href('ticket', 540, 'attachment', None)
      '/trac/ticket/540/attachment'

      The first path segment can also be specified by calling an attribute
 -    of the function, as follows:
 +    of the instance, as follows:

      >>> href.ticket(540)
      '/trac/ticket/540'
 @@ -99,8 +99,8 @@
      >>> href('ticket', 540)
      'https://projects.edgewall.com/trac/ticket/540'

 -    Finally, the first path segment of the URL to generate can be
 specified in
 -    the following way, mainly to improve readability:
 +    In common usage, it may improve readability to use the function-
 calling
 +    ability for the first component of the URL as mentioned earlier:

      >>> href = Href('/trac')
      >>> href.ticket(540)
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2761>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list