Skip to content

Improve struct iterable handling#20

Merged
jss367 merged 2 commits into
mainfrom
codex/find-bugs-in-code-and-structure-differences
Apr 29, 2026
Merged

Improve struct iterable handling#20
jss367 merged 2 commits into
mainfrom
codex/find-bugs-in-code-and-structure-differences

Conversation

@jss367
Copy link
Copy Markdown
Owner

@jss367 jss367 commented Nov 23, 2025

Summary

  • avoid relying on len() for generic iterables to prevent errors on unsized inputs
  • limit iteration to a small preview and reuse it for both example and structured views
  • append appropriate summary entries for sized and unsized iterables without exhausting them

Testing

  • pytest (fails: ModuleNotFoundError: No module named 'pandas')

Codex Task

Resolve conflict in src/pyxtend/struct.py: keep main's helper-based
refactor (_create_iterable_structure, _create_custom_object_structure),
which already incorporates the PR's intent (Sized check + bounded
preview without exhausting the iterable). Also keep main's module
docstring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jss367 jss367 merged commit 33c4553 into main Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant