Skip to content

py/objint: Fix comment for true operand in binary op extra cases.#19004

Open
cuiweixie wants to merge 1 commit intomicropython:masterfrom
cuiweixie:fix/objint-bool-true-comment
Open

py/objint: Fix comment for true operand in binary op extra cases.#19004
cuiweixie wants to merge 1 commit intomicropython:masterfrom
cuiweixie:fix/objint-bool-true-comment

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

Corrects the comment next to mp_const_true handling in mp_obj_int_binary_op_extra_cases: it said true acts as 0, but the code passes small int 1, consistent with Python bool semantics.

Notes

Trivial comment-only change; no behaviour change.

The comment incorrectly said true acts as 0; the implementation passes
small int 1, matching Python bool semantics.

Signed-off-by: Weixie Cui <[email protected]>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.46%. Comparing base (2dc2e30) to head (dd97426).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19004   +/-   ##
=======================================
  Coverage   98.46%   98.46%           
=======================================
  Files         176      176           
  Lines       22784    22784           
=======================================
  Hits        22435    22435           
  Misses        349      349           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

Code size report:

Reference:  esp32/boards/SEEED_XIAO_ESP32C6: Add new XIAO board definition. [2dc2e30]
Comparison: py/objint: Fix comment for true operand in binary op extra cases. [merge of dd97426]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants