realpython / realpython/materials

TDD Hashtag table - TypeError in 01_define_a_custom_hashtable_class

未关闭
#253 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
5.2k
派生
5.3k
平均合并
4 天 10 小时
30 天内合并 PR
10

描述

source: hashtable.py in 01_define_a_custom_hashtable_class

Describe the bug
running the test throws an error for line self.values = capacity * [None]
TypeError: cant multiply sequence by non-int of type ' NoneType'

That's a pity, because I really like this TDD cource!

Running on Windows 10 with python version 3.7.3

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 hashtable/01_hashtable_prototype/01_define_a_custom_hashtable_class/hashtable.py 和 01_define_a_custom_hashtable_class 练习开始。在报告的 setup 上运行其测试或复现,然后检查 self.values = capacity * [None] 附近的初始化。完成标准是该练习不再引发报告中的 TypeError。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
testing-qa
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。