Remove __len__ from aggregate types
Open
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 373
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 10
Description
Having a `__len__` can produce subtle errors, since a zero-length object is considered false-ish by Python. Aggregate types already have a `elements` attribute which can be used instead.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the aggregate type definitions and their existing __len__ implementations; the issue does not name files or tests. Check how the elements attribute is exposed, remove __len__ from each aggregate type, and verify that aggregate objects no longer provide length-based truthiness while elements remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100