changeset: 79148:62ddf16eea24 parent: 79145:d6e4080960a3 parent: 79147:101354f95a07 user: Ezio Melotti date: Mon Sep 24 17:31:37 2012 +0300 files: Doc/tutorial/stdlib2.rst description: #16019, #16020: merge with 3.2. diff -r d6e4080960a3 -r 62ddf16eea24 Doc/tutorial/stdlib2.rst --- a/Doc/tutorial/stdlib2.rst Mon Sep 24 17:08:05 2012 +0300 +++ b/Doc/tutorial/stdlib2.rst Mon Sep 24 17:31:37 2012 +0300 @@ -95,7 +95,7 @@ >>> d = dict(item='unladen swallow') >>> t.substitute(d) Traceback (most recent call last): - . . . + ... KeyError: 'owner' >>> t.safe_substitute(d) 'Return the unladen swallow to $owner.' @@ -220,7 +220,9 @@ logging.error('Error occurred') logging.critical('Critical error -- shutting down') -This produces the following output:: +This produces the following output: + +.. code-block:: none WARNING:root:Warning:config file server.conf not found ERROR:root:Error occurred @@ -311,6 +313,8 @@ >>> print("Handling", d.popleft()) Handling task1 +:: + unsearched = deque([starting_node]) def breadth_first_search(unsearched): node = unsearched.popleft()

AltStyle によって変換されたページ (->オリジナル) /