fixed a bug in a doctest and replaced ``iteritems`` with ``items``