修复语法错误, 添加doctest