dry-python / dry-python/lambdas
Prevent Python from treating _Callable an iterable
オープン
- 主要言語
- Python
- スター
- 286
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 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:
```python
[*__import__("lambdas")._]
```
## Implementation
That should be a no-brainer to fix and write tests for.
```
class _Callable:
__iter__ = None
```
コントリビューションガイド
調査の方向性
パッケージ内の _Callable クラスを見つけ、[*__import__("lambdas")._] で問題を再現してください。要求されている非イテラブルの動作を追加し、_Callable がイテラブルとして扱われないことを確認する回帰テストを追加してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 38/100