Index: django/core/serializers/__init__.py
===================================================================
--- django/core/serializers/__init__.py	(revision 6184)
+++ django/core/serializers/__init__.py	(working copy)
@@ -3,9 +3,9 @@
 
 Usage::
 
-    >>> from django.core import serializers
-    >>> json = serializers.serialize("json", some_query_set)
-    >>> objects = list(serializers.deserialize("json", json))
+    from django.core import serializers
+    json = serializers.serialize("json", some_query_set)
+    objects = list(serializers.deserialize("json", json))
 
 To add your own serializers, use the SERIALIZATION_MODULES setting::
 
Index: django/core/validators.py
===================================================================
--- django/core/validators.py	(revision 6184)
+++ django/core/validators.py	(working copy)
@@ -410,7 +410,13 @@
     >>> v(8, None)
     >>> v(16, None)
     >>> v(17, None)
-    django.core.validators.ValidationError: ['This value must be a power of 2.']
+    Traceback (most recent call last):
+      File "doctest.py", line 1212, in __run
+        compileflags, 1) in test.globs
+      File "<doctest django.core.validators.IsAPowerOf[4]>", line 1, in <module>
+        v(17, None)
+      File "django/core/validators.py", line 424, in __call__
+    ValidationError: [u'This value must be a power of 2.']
     """
     def __init__(self, power_of):
         self.power_of = power_of
Index: django/utils/feedgenerator.py
===================================================================
--- django/utils/feedgenerator.py	(revision 6184)
+++ django/utils/feedgenerator.py	(working copy)
@@ -3,6 +3,7 @@
 
 Sample usage:
 
+>>> from django.utils import feedgenerator
 >>> feed = feedgenerator.Rss201rev2Feed(
 ...     title=u"Poynter E-Media Tidbits",
 ...     link=u"http://www.poynter.org/column.asp?id=31",
Index: django/utils/datastructures.py
===================================================================
--- django/utils/datastructures.py	(revision 6184)
+++ django/utils/datastructures.py	(working copy)
@@ -238,22 +238,22 @@
     may contain dots to specify inner dictionaries. It's confusing, but this
     example should make sense.
 
-    >>> d = DotExpandedDict({'person.1.firstname': ['Simon'],
-            'person.1.lastname': ['Willison'],
-            'person.2.firstname': ['Adrian'],
-            'person.2.lastname': ['Holovaty']})
-    >>> d
-    {'person': {'1': {'lastname': ['Willison'], 'firstname': ['Simon']},
-    '2': {'lastname': ['Holovaty'], 'firstname': ['Adrian']}}}
-    >>> d['person']
-    {'1': {'firstname': ['Simon'], 'lastname': ['Willison'],
-    '2': {'firstname': ['Adrian'], 'lastname': ['Holovaty']}
-    >>> d['person']['1']
-    {'firstname': ['Simon'], 'lastname': ['Willison']}
+    >>> d = DotExpandedDict({'person.1.firstname': ['Simon'], \
+                    'person.1.lastname': ['Willison'], \
+                    'person.2.firstname': ['Adrian'], \
+                    'person.2.lastname': ['Holovaty']})
+    >>> d['person']['1']['lastname']
+    ['Willison']
+    >>> d['person']['1']['firstname']
+    ['Simon']
+    >>> d['person']['2']['lastname']
+    ['Holovaty']
+    >>> d['person']['2']['firstname']
+    ['Adrian']
 
     # Gotcha: Results are unpredictable if the dots are "uneven":
     >>> DotExpandedDict({'c.1': 2, 'c.2': 3, 'c': 1})
-    >>> {'c': 1}
+    {'c': 1}
     """
     def __init__(self, key_to_list_mapping):
         for k, v in key_to_list_mapping.items():
Index: django/template/__init__.py
===================================================================
--- django/template/__init__.py	(revision 6184)
+++ django/template/__init__.py	(working copy)
@@ -34,8 +34,10 @@
 
 Sample code:
 
->>> import template
->>> s = '''
+
+
+>>> from django import template
+>>> s = u'''
 ... <html>
 ... {% if test %}
 ...     <h1>{{ varvalue }}</h1>
@@ -49,10 +51,10 @@
 
 >>> c = template.Context({'test':True, 'varvalue': 'Hello'})
 >>> t.render(c)
-'\n<html>\n\n    <h1>Hello</h1>\n\n</html>\n'
+u'\\n<html>\\n\\n    <h1>Hello</h1>\\n\\n</html>\\n'
 >>> c = template.Context({'test':False, 'varvalue': 'Hello'})
 >>> t.render(c)
-'\n<html>\n\n</html>\n'
+u'\\n<html>\\n\\n</html>\\n'
 """
 import re
 from inspect import getargspec
@@ -528,14 +530,12 @@
     and return a list of tuples of the filter name and arguments.
     Sample:
         >>> token = 'variable|default:"Default value"|date:"Y-m-d"'
-        >>> p = FilterParser(token)
-        >>> p.filters
-        [('default', 'Default value'), ('date', 'Y-m-d')]
-        >>> p.var
+        >>> p = Parser('')
+        >>> fe = FilterExpression(token, p)
+        >>> len(fe.filters)
+        2
+        >>> fe.var
         'variable'
-
-    This class should never be instantiated outside of the
-    get_filters_from_token helper function.
     """
     def __init__(self, token, parser):
         self.token = token
@@ -646,7 +646,7 @@
 
     >>> c = {'article': {'section':'News'}}
     >>> resolve_variable('article.section', c)
-    'News'
+    u'News'
     >>> resolve_variable('article', c)
     {'section': 'News'}
     >>> class AClass: pass
@@ -654,7 +654,7 @@
     >>> c.article = AClass()
     >>> c.article.section = 'News'
     >>> resolve_variable('article.section', c)
-    'News'
+    u'News'
 
     (The example assumes VARIABLE_ATTRIBUTE_SEPARATOR is '.')
     """
