>>> 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.'
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
>>> print "Handling", d.popleft()
Handling task1
+::
+
unsearched = deque([starting_node])
def breadth_first_search(unsearched):
node = unsearched.popleft()