Implement complex.from_number#7453
Conversation
test_mul and test_truediv fail due to incorrect INF/NAN handling in complex arithmetic operations. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_complex.py (TODO: 4) dependencies: dependent tests: (no tests depend on complex) Legend:
|
This pull request does things:
test.test_complexto CPython 3.14.3complex.from_numbercomplex.__eq__behavior wherecomplex(float('nan'), float('nan')) == complex(float('nan'), float('nan'))wasTrue.As a note,
test_truedivandtest_mulfail becausecomplex(float('inf'), float('inf')) * 1returnsnan+nanj. It is num-complex's bug and I'll see it later.Summary by CodeRabbit
New Features
Bug Fixes