isi-vista / immutablecollections

A library for immutable collections, in the spirit of Guava's Immutable Collections.
MIT License
3 stars 2 forks source link

Properly override __getitem__ #20

Closed gabbard closed 5 years ago

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@991aec8). Click here to learn what that means. The diff coverage is 69.23%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #20   +/-   ##
=========================================
  Coverage          ?   90.03%           
=========================================
  Files             ?        7           
  Lines             ?      582           
  Branches          ?        0           
=========================================
  Hits              ?      524           
  Misses            ?       58           
  Partials          ?        0
Impacted Files Coverage Δ
immutablecollections/immutableset.py 84.84% <64.7%> (ø)
immutablecollections/immutablelist.py 94.44% <77.77%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 991aec8...45db9d9. Read the comment docs.

gabbard commented 5 years ago

@ConstantineLignos : Ready for re-review. I fixed the comment problem.

re: slicing, I think the performance impact is probably too big to do anything else, and the type signature should hopefully alert the user to any clash of expectations (and if they aren't using mypy, it's their own fault :-P ). We could consider adding another method to produce ImmutableX-typed slices, though, for those willing to pay the performance penalty.