mirror of https://github.com/django/django.git
Fixed the syntax used for the Python repl examples in docs and docstrings.
This commit is contained in:
parent
208e26b39c
commit
1583d40224
|
@ -10,8 +10,8 @@ Example Usage::
|
||||||
|
|
||||||
>>> from django.core.files import locks
|
>>> from django.core.files import locks
|
||||||
>>> with open('./file', 'wb') as f:
|
>>> with open('./file', 'wb') as f:
|
||||||
>>> locks.lock(f, locks.LOCK_EX)
|
... locks.lock(f, locks.LOCK_EX)
|
||||||
>>> f.write('Django')
|
... f.write('Django')
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__all__ = ('LOCK_EX','LOCK_SH','LOCK_NB','lock','unlock')
|
__all__ = ('LOCK_EX','LOCK_SH','LOCK_NB','lock','unlock')
|
||||||
|
|
|
@ -16,7 +16,7 @@ Sample usage:
|
||||||
... description="Testing."
|
... description="Testing."
|
||||||
... )
|
... )
|
||||||
>>> with open('test.rss', 'w') as fp:
|
>>> with open('test.rss', 'w') as fp:
|
||||||
>>> feed.write(fp, 'utf-8')
|
... feed.write(fp, 'utf-8')
|
||||||
|
|
||||||
For definitions of the different versions of RSS, see:
|
For definitions of the different versions of RSS, see:
|
||||||
http://diveintomark.org/archives/2004/02/04/incompatible-rss
|
http://diveintomark.org/archives/2004/02/04/incompatible-rss
|
||||||
|
|
|
@ -240,7 +240,7 @@ Sample usage::
|
||||||
... description="Testing."
|
... description="Testing."
|
||||||
... )
|
... )
|
||||||
>>> with open('test.rss', 'w') as fp:
|
>>> with open('test.rss', 'w') as fp:
|
||||||
>>> feed.write(fp, 'utf-8')
|
... feed.write(fp, 'utf-8')
|
||||||
|
|
||||||
For simplifying the selection of a generator use ``feedgenerator.DefaultFeed``
|
For simplifying the selection of a generator use ``feedgenerator.DefaultFeed``
|
||||||
which is currently ``Rss201rev2Feed``
|
which is currently ``Rss201rev2Feed``
|
||||||
|
|
|
@ -771,7 +771,7 @@ arguments at time of construction:
|
||||||
|
|
||||||
>>> c = Client()
|
>>> c = Client()
|
||||||
>>> with open('wishlist.doc') as fp:
|
>>> with open('wishlist.doc') as fp:
|
||||||
>>> c.post('/customers/wishes/', {'name': 'fred', 'attachment': fp})
|
... c.post('/customers/wishes/', {'name': 'fred', 'attachment': fp})
|
||||||
|
|
||||||
(The name ``attachment`` here is not relevant; use whatever name your
|
(The name ``attachment`` here is not relevant; use whatever name your
|
||||||
file-processing code expects.)
|
file-processing code expects.)
|
||||||
|
|
Loading…
Reference in New Issue