Prevent Python from treating _Callable an iterable
还没有人认领这个 Issue。
评估
调研方向
在 package 中定位 Callable 类,并使用 [*import("lambdas").] 重现该问题。添加所请求的不可迭代行为,以及一个回归测试,确认 _Callable 不会被视为 iterable。
由索引模型根据 Issue 内容生成。
描述
Problem
Due to lack of __iter__ implementation, Python is attempting to iterate over _Callable when possible. It's generally an undesired behavior, given the purposes of the _Callable class.
You can easily reproduce the issue:
[*__import__("lambdas")._]
Implementation
That should be a no-brainer to fix and write tests for.
class _Callable:
__iter__ = None
- 主要语言
- Python
- 星标
- 286
- 派生
- 6
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dry-python/lambdas 的其他 Issue
-
Python > 3.11 未关闭
难度 4/5 3-5 天 新手友好度 35/100
dry-python/lambdas#196 ·
-
Bug in the docs 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
dry-python/lambdas#176 · 9 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
dry-python/lambdas#112 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
dry-python/lambdas#46 · 3 条评论 · 1 个 reaction ·
-
enhancement good first issue hacktoberfest
难度 4/5 3-5 天 新手友好度 35/100
dry-python/lambdas#4 ·
查看 dry-python/lambdas 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/Repo2RLEnv#163 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
难度 2/5 1-3 小时 新手友好度 70/100
NousResearch/hermes-agent#121143 ·