• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / py-slang / 28845351947
78%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 06:10AM UTC
Jobs 1
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jul 2026 06:06AM UTC coverage: 77.913% (+0.4%) from 77.557%
28845351947

push

github

web-flow
CSE machine: Spec-driven operator semantics for Python §1–§4: ==, is, ordering (#198) (#207)

* Factor the operator typing tables with \input and revise specs (#198 Part A)

The two operator typing tables (python_typing.tex for Python §1/§2,
python_typing_3.tex for §3/§4) had drifted apart by hand. Split them so
the common rows live once:

  front + middle_12 + back  ->  Python §1/§2
  front + middle_34 + back  ->  Python §3/§4

The diff between the middle fragments is now exactly the documented
chapter delta: §1/§2 restrict ==/!= to numeric x numeric and
string x string (no is operator); §3/§4 give ==, != and is
any x any -> bool, behaving as in Python.

* Make ==, != and is total (any x any) at Python §3/§4, per the revised spec

Implements the semantics of docs/specs/python_typing_middle_34.tex
(#198): at Python §3/§4, `==`/`!=` and `is`/`is not` accept any operand
types and behave as in Python.

- `==`/`!=` on lists: structural (element-wise, recursive) equality,
  replacing the previous UnsupportedOperandTypeError. Numbers compare
  across int/float/complex inside lists too ([1] == [1.0] is True).
  An identity shortcut lets comparisons of shared substructure
  terminate early; self-referential lists without shared identity
  exhaust the stack, mirroring CPython's RecursionError.
- `is`/`is not` on any operands: lists and functions compare by
  reference (sharing is what `is` exists to observe); immutable values
  compare by value, staying within Python's unspecified interning
  behavior while remaining deterministic (1 is 1 -> True,
  1 is 1.0 -> False, None is None -> True).

Two pre-existing bugs surfaced and fixed along the way:

- `x is not y` evaluated as `x is y`: the grammar kept TokenType.IS on
  the token and only changed its lexeme, which nothing reads. The
  postprocess now assigns TokenType.ISNOT (fix in python.ne and the
  generated python-grammar.ts).
- NoIsOperatorValidator (chapters 1/2) never fired: `is` parses as an
  ExprNS.Co... (continued)

2555 of 3545 branches covered (72.07%)

Branch coverage included in aggregate %.

51 of 55 new or added lines in 4 files covered. (92.73%)

1 existing line in 1 file now uncovered.

6031 of 7475 relevant lines covered (80.68%)

14270.53 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
74.9
9.34% src/engines/cse/operators.ts
2
92.86
-4.58% src/engines/cse/types.ts

Coverage Regressions

Lines Coverage ∆ File
1
74.9
9.34% src/engines/cse/operators.ts
Jobs
ID Job ID Ran Files Coverage
1 28845351947.1 07 Jul 2026 06:10AM UTC 86
77.91
GitHub Action Run
Source Files on build 28845351947
  • Tree
  • List 86
  • Changed 7
  • Source Changed 6
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28845351947
  • 8271bfb4 on github
  • Prev Build on main (#28831537578)
  • Next Build on main (#28852666182)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc