笨办法学pythoon 习题48 词汇扫描器代码 。 单元测试代码有微调。 常见错误 1. 'module' object has no attribute 'scan' 在测试文件里改成from ex48.lexicon import Lexicon 2.unbound method scan() must be called with Lexicon instance as first argument (got str instance instead) 类在引用前没有实例化,将测试文件改成 assert_equal(lexicon().scan("north"), [('direct