Changeset 3801:f84caaf87d1d in livinglogic.python.xist

Show
Ignore:
Timestamp:
06/29/09 22:14:18 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Fix typos in docstrings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xsc.py

    r3797 r3801  
    474474    """ 
    475475    Warning that is issued when there is an illegal comment, i.e. one containing 
    476     ``--`` or ending in ``-``. (This can only happen when the comment is 
    477     instantiated by the program, not when parsed from an XML file.) 
     476    ``--`` or ending in ``-``. (This can only happen when the comment was created 
     477    by code, not when parsed from an XML file.) 
    478478    """ 
    479479 
     
    489489    Exception that is raised when there is an illegal processing instruction, 
    490490    i.e. one containing ``?>``. (This can only happen when the processing 
    491     instruction is instantiated by the program, not when parsed from an XML 
    492     file.) 
     491    instruction was created by code, not when parsed from an XML file.) 
    493492    """ 
    494493 
     
    694693    def __unicode__(self): 
    695694        """ 
    696         Return the character content of :var:`self` as a unicode string. This means 
    697         that comments and processing instructions will be filtered out. For 
    698         elements you'll get the element content. 
     695        Return the character content of :var:`self` as a unicode string. This 
     696        means that comments and processing instructions will be filtered out. 
     697        For elements you'll get the element content. 
    699698 
    700699        :meth:`__unicode__` can be used everywhere where a plain string 
     
    753752        :var:`self` is created by the parser and must return the node that is to 
    754753        be put into the tree (in most cases this is :var:`self`, it's used e.g. 
    755         by :class:`URLAttr` to incorporate the base URL into the attribute. 
     754        by :class:`URLAttr` to incorporate the base URL into the attribute). 
    756755 
    757756        For elements :func:`parsed` will be called twice: Once at the beginning 
     
    917916        """ 
    918917        Return a version of :var:`self`, where textnodes or character references 
    919         that contain only linefeeds are removed, i.e. potentially needless 
     918        that contain only linefeeds are removed, i.e. potentially useless 
    920919        whitespace is removed. 
    921920        """ 
     
    13581357    def __getitem__(self, index): 
    13591358        """ 
    1360         Return the :var:`index`'th node for the content of the fragment. If 
     1359        Return the :var:`index`'th node of the content of the fragment. If 
    13611360        :var:`index` is a list :meth:`__getitem__` will work recursively. 
    13621361        If :var:`index` is an empty list, :var:`self` will be returned. 
     
    14211420    def __delitem__(self, index): 
    14221421        """ 
    1423         Remove the :var:`index`'th content node from the fragment If :var:`index` 
     1422        Remove the :var:`index`'th content node from the fragment. If :var:`index` 
    14241423        is a list, the innermost index will be deleted, after traversing the rest 
    14251424        of :var:`index` recursively. If :var:`index` is an empty list, an 
     
    15221521        :var:`self`. 
    15231522 
    1524         if :var:`clone` is false one node will be inserted several times, if 
     1523        if :var:`clone` is false, one node will be inserted several times, if 
    15251524        :var:`clone` is true, clones of this node will be used. 
    15261525        """ 
     
    18701869        will be issued through the Python warning framework. 
    18711870 
    1872         If :var:`self` is "fancy" (i.e. contains non-:class:`Text` nodes), no check 
    1873         will be done. 
     1871        If :var:`self` is "fancy" (i.e. contains non-:class:`Text` nodes), no 
     1872        check will be done. 
    18741873        """ 
    18751874        values = self.__class__.values 
     
    19541953class IntAttr(NumberAttr): 
    19551954    """ 
    1956     Attribute class that is used when the attribute value may be an 
    1957     integer. 
     1955    Attribute class that is used when the attribute value may be an integer. 
    19581956    """ 
    19591957 
     
    19721970    """ 
    19731971 
    1974     # We can't simply overwrite _publishattrvalue(), because for xhtml==0 we don't output a "proper" attribute 
     1972    # We can't simply overwrite :meth:`_publishattrvalue`, because for ``xhtml==0`` we don't output a "proper" attribute 
    19751973    def publish(self, publisher): 
    19761974        if publisher.validate: 
     
    20122010        """ 
    20132011        Replace each URL in the style. Each URL will be passed to the callable 
    2014         :var:`replacer` and replaced with the return value. 
     2012        :var:`replacer` and replaced with the returned value. 
    20152013        """ 
    20162014        self[:] = self._transform(replacer) 
     
    25192517    def _iterallvalues(self): 
    25202518        """ 
    2521         Iterate all values, even the unset ones 
     2519        Iterate through all values, even the unset ones. 
    25222520        """ 
    25232521        return dict.itervalues(self) 
     
    25432541    def filtered(self, function): 
    25442542        """ 
    2545         Return a filtered version of the :var:`self`. 
     2543        Return a filtered version of :var:`self`. 
    25462544        """ 
    25472545        node = self._create() 
     
    27982796    def append(self, *items): 
    27992797        """ 
    2800         Append every item in :var:`items` to the element content. 
     2798        Append every item in :var:`items` to the elements content. 
    28012799        """ 
    28022800        self.content.append(*items) 
     
    28042802    def extend(self, items): 
    28052803        """ 
    2806         Append all items in :var:`items` to element content. 
     2804        Append all items in :var:`items` to the elements content. 
    28072805        """ 
    28082806        self.content.extend(items) 
     
    28542852        will be put into the attribute named :var:`heighattr`. 
    28552853        """ 
    2856  
    28572854        try: 
    28582855            size = url.imagesize() 
     
    31763173    def publish(self, publisher): 
    31773174        yield publisher.encode(u"&") 
    3178         yield publisher.encode(self.xmlname) 
     3175       yield publisher.encode(self.xmlname) 
    31793176        yield publisher.encode(u";") 
    31803177 
     
    33053302        Register :var:`object` in the pool. :var:`object` can be: 
    33063303 
    3307         *   A :class:`Element`, :class:`ProcInst`, :class:`Entity`, or 
     3304        *   a :class:`Element`, :class:`ProcInst`, :class:`Entity`, or 
    33083305            :class:`CharRef` class; 
    33093306 
    3310         *   An :class:`Attr` class for a global attribute; 
    3311  
    3312         *   An :class:`Attrs` class containing global attributes; 
    3313  
    3314         *   A :class:`dict` (all values will be registered, this makes it possible 
     3307        *   an :class:`Attr` class for a global attribute; 
     3308 
     3309        *   an :class:`Attrs` class containing global attributes; 
     3310 
     3311        *   a :class:`dict` (all values will be registered, this makes it possible 
    33153312            to e.g. register all local variables by passing ``vars()``); 
    33163313 
    3317         *   A module (all attributes in the module will be registered). 
     3314        *   a module (all attributes in the module will be registered). 
    33183315        """ 
    33193316        if isinstance(object, type): 
     
    33723369        """ 
    33733370        Return the element class for the element with the Python name :var:`name` 
    3374         and the namespace :var:`xmlns`. If the element can't be found a 
     3371        and the namespace :var:`xmlns`. If the element can't be found an 
    33753372        :exc:`IllegalElementError` will be raised. 
    33763373        """ 
     
    33993396        Return the element class for the element type with the XML name 
    34003397        :var:`name` and the namespace :var:`xmlns`. If the element can't 
    3401         be found a :exc:`IllegalElementError` will be raised. 
     3398        be found an :exc:`IllegalElementError` will be raised. 
    34023399        """ 
    34033400        if isinstance(xmlns, (list, tuple)): 
     
    34583455        """ 
    34593456        Return the processing instruction class for the PI with the Python name 
    3460         :var:`name`. If the element can't be found a :exc:`IllegalProcInstError` 
    3461         will be raised. 
     3457        :var:`name`. If the processing instruction can't be found an 
     3458        :exc:`IllegalProcInstError` will be raised. 
    34623459        """ 
    34633460        try: 
     
    34743471        """ 
    34753472        Return the processing instruction class for the PI with the XML name 
    3476         :var:`name`. If the element can't be found a :exc:`IllegalProcInstError` 
    3477         will be raised. 
     3473        :var:`name`. If the processing instruction can't be found an 
     3474        :exc:`IllegalProcInstError` will be raised. 
    34783475        """ 
    34793476        try: 
     
    35233520    def entityclass(self, name): 
    35243521        """ 
    3525         Return the entity for the entity with the Python name :var:`name`. 
    3526         If the entity can't be found a :exc:`IllegalEntityError` will be raised. 
     3522        Return the entity class for the entity with the Python name :var:`name`. 
     3523        If the entity can't be found an :exc:`IllegalEntityError` will be raised. 
    35273524        """ 
    35283525        try: 
     
    35383535    def entityclass_xml(self, name): 
    35393536        """ 
    3540         Return the entity for the entity with the XML name :var:`name`. 
    3541         If the entity can't be found a :exc:`IllegalEntityError` will be raised. 
     3537        Return the entity class for the entity with the XML name :var:`name`. 
     3538        If the entity can't be found an :exc:`IllegalEntityError` will be raised. 
    35423539        """ 
    35433540        try: 
     
    36373634    def hascharref(self, name): 
    36383635        """ 
    3639         Is there a registered character entity class in :var:`self` with the Python 
    3640         name or codepoint :var:`name`? 
     3636        Is there a registered character entity class in :var:`self` with the 
     3637        Python name or codepoint :var:`name`? 
    36413638        """ 
    36423639        if isinstance(name, (int, long)): 
     
    36593656    def attrclass(self, name, xmlns): 
    36603657        """ 
    3661         Return the aatribute class for the global attribute with the Python name 
     3658        Return the attribute class for the global attribute with the Python name 
    36623659        :var:`name` and the namespace :var:`xmlns`. If the attribute can't 
    36633660        be found a :exc:`IllegalAttrError` will be raised.