diff options
| author | ianb <devnull@localhost> | 2007-02-01 00:20:13 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2007-02-01 00:20:13 +0000 |
| commit | 695731610bcf4d869456caffea28e40b44cd980e (patch) | |
| tree | 2b5d4ace7253b196c056ddae96b3d3d6009e64ab | |
| parent | 54545f336fb9860d045386b4b956c0c32639dd64 (diff) | |
| download | paste-695731610bcf4d869456caffea28e40b44cd980e.tar.gz | |
Fix up docstrings for reST validity
| -rw-r--r-- | docs/news.txt | 10 | ||||
| -rw-r--r-- | paste/mimeparse.py | 7 | ||||
| -rw-r--r-- | paste/util/looper.py | 7 | ||||
| -rw-r--r-- | paste/util/multidict.py | 2 | ||||
| -rw-r--r-- | paste/util/template.py | 2 |
5 files changed, 17 insertions, 11 deletions
diff --git a/docs/news.txt b/docs/news.txt index 2159cac..eb67c58 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -38,10 +38,12 @@ In paste.wsgiwrappers * ``paste.wsgiwrappers.WSGIRequest`` has match_accept() function to screen incoming HTPT Accept values against a list of mime-types. -* ``paste.wsgiwrappers.WSGIRequest.defaults`` now accepts 2 new keys: - - language = The i18n language that should be used as the fallback should - a translation not occur in a language file. See docs for - details. +* ``paste.wsgiwrappers.WSGIRequest.defaults`` now accepts a new key: + + ``language``: + The i18n language that should be used as the fallback should + a translation not occur in a language file. See docs for + details. * ``paste.wsgiwrappers.WSGIRequest`` can now optionally decode form parameters to unicode when it has a ``charset`` value set. diff --git a/paste/mimeparse.py b/paste/mimeparse.py index b687041..08d0e32 100644 --- a/paste/mimeparse.py +++ b/paste/mimeparse.py @@ -39,10 +39,11 @@ def parse_media_range(range): """Carves up a media range and returns a tuple of the (type, subtype, params) where 'params' is a dictionary of all the parameters for the media range. - For example, the media range 'application/*;q=0.5' would - get parsed into: + + For example, the media range ``application/*;q=0.5`` would + get parsed into:: - ('application', '*', {'q', '0.5'}) + ('application', '*', {'q', '0.5'}) In addition this function also guarantees that there is a value for 'q' in the params dictionary, filling it diff --git a/paste/util/looper.py b/paste/util/looper.py index a82c1da..03a6b42 100644 --- a/paste/util/looper.py +++ b/paste/util/looper.py @@ -22,10 +22,13 @@ __all__ = ['looper'] class looper(object): """ + Helper for looping (particularly in templates) + Use this like:: - + for loop, item in looper(seq): - if loop.first:... + if loop.first: + ... """ def __init__(self, seq): diff --git a/paste/util/multidict.py b/paste/util/multidict.py index 81fa9aa..d3eb1e9 100644 --- a/paste/util/multidict.py +++ b/paste/util/multidict.py @@ -207,7 +207,7 @@ class UnicodeMultiDict(DictMixin): fly. Decoding is not applied to assigned values. The key/value contents are assumed to be ``str``/``strs`` or - ``str``/``FieldStorages`` (as is returned by the paste.request.parse_ + ``str``/``FieldStorages`` (as is returned by the ``paste.request.parse_`` functions). Can optionally also decode keys when the ``decode_keys`` argument is diff --git a/paste/util/template.py b/paste/util/template.py index f279235..6bbd37f 100644 --- a/paste/util/template.py +++ b/paste/util/template.py @@ -94,7 +94,7 @@ class Template(object): def __repr__(self): return '<%s %s name=%r>' % ( self.__class__.__name__, - hex(id(self))[2:], name) + hex(id(self))[2:], self.name) def substitute(self, *args, **kw): if args: |
