Skip to content

Commit

Permalink
to support/encourage immutability, removed setting field
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Rodriguez committed Mar 13, 2015
1 parent c7af366 commit 5278fa0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions functional/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def __len__(self):
def __getitem__(self, key):
return _wrap(self.sequence[key])

def __setitem__(self, key, value):
self.sequence[key] = value

def __iter__(self):
return iter(self.sequence)

Expand Down
7 changes: 0 additions & 7 deletions test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ def test_getitem(self):
self.assertIsInstance(s[0], set)
self.assertEqual(s[0], l[0])

def test_setitem(self):
l = [1, 2, 3, 4, [5, 6, 7]]
s = seq(l)
s[1:3] = 8, 9
expect = [1, 8, 9, 4, [5, 6, 7]]
self.assertEqual(s, expect)

def test_iter(self):
l = list(enumerate(seq([1, 2, 3])))
e = list(enumerate([1, 2, 3]))
Expand Down

0 comments on commit 5278fa0

Please sign in to comment.