Fix doc example bug reported on python-list by Akshay Verma.