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

basilisp-lang / basilisp / #503 / 1
99%
main: 99%

Build:
Build:
LAST BUILD BRANCH: feature/python-inspect-ns
DEFAULT BRANCH: main
Ran 11 Jun 2020 01:01PM UTC
Files 37
Run time 4s
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

11 Jun 2020 12:51PM UTC coverage: 98.691% (+0.2%) from 98.528%
#503.1

push

coveralls-python

web-flow
Equality defined between builtin collections respect partitions (#558)

This commit corrects the equality operators between builtin collection types to respect equality partitions. Equality partitions are segments of different collections within which collections can be considered equal and between which collections cannot be considered equal. The three equality partitions are: sequential types (vectors, seqs), maps, and sets.

Several other small changes were made in support of that goal:

 * `Map` types now properly support the full Python `Mapping` protocol.
    * `Map.__iter__` now acts like a standard Python `Mapping` type, returning an iterable of keys. Formerly, it was an iterable of `MapEntry` types, which was occasionally convenient, but definitely un-idiomatic in Python. This change doesn't really affect Basilisp code though, since Basilisp always calls `.seq()` on maps to iterate over entries.
    * Removed the `.iteritems()`, `.iterkeys()`, and `.itervalues()` methods which simply forwarded to the base `pyrsistent.PMap` implementation.
    * `Mapping.items()`, `.keys()`, and `.values()` are now supported. All cases relying on the former `__iter__` implementation have generally been updated to use `.items()` (though a few cases were updated to use `.seq()`).
 * All builtin `ISeq` types and `IPersistentVector` have been annotated with the marker interface `ISequential` which is attached to all sequential types in that equality partition.
 * `IPersistentVector` types are no longer considered `Mapping` types, though they are still considered `IAssociative`. It never really made sense to consider them `Mapping` types and it was generally inconvenient since it is not useful to consider vectors as maps in most cases.
 * Removed the custom `Vector.rseq()` implementation since it was undoubtedly no more efficient than Python's `reversed` using the Python `Sequence` protocol.

Two small fixes unrelated to the main changes were also inclu... (continued)

2417 of 2469 branches covered (97.89%)

Branch coverage included in aggregate %.

6633 of 6701 relevant lines covered (98.99%)

0.99 hits per line

Source Files on job #503.1
  • Tree
  • List 0
  • Changed 11
  • Source Changed 11
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 503
  • 844ba291 on github
  • Prev Job for on master (##495.1)
  • Next Job for on master (##509.1)
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