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

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

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

pending completion
#503

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

Jobs
ID Job ID Ran Files Coverage
1 #503.1 11 Jun 2020 01:01PM UTC 0
98.69
Source Files on build #503
Detailed source file information is not available for this build.
  • Back to Repo
  • 844ba291 on github
  • Prev Build on master
  • Next Build on master
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