pydata/pandas — pull request #4756 by jreback (2013-09-05 18:13:02+00:00)
Title: BUG/ER:  (GH2702) Bug with Series indexing not raising an error when the right-hand-side has an incorrect length

closes #2702

These all will raise error messages now

```
In [1]: s = Series(list('abc'))

In [2]: s[0:3] = list(range(27))
ValueError: cannot set using a slice indexer with a different length than the value

In [3]: s[[0,1,2]] = list(range(27))
ValueError: cannot set using a list-like indexer with a different length than the value

In [4]: s[[0,1,2]] = list(range(2))
ValueError: cannot set using a list-like indexer with a different length than the value

```

With a step and a slice indexer (not sure was tested before)

When the length of the slicer matches exactly it works
```
In [5]: s = Series(list('abcdef'))

In [6]: s[0:4:2] = list(range(2))

In [7]: s
Out[7]:
0 0
1 b
2 1
3 d
4 e
5 f
dtype: object
```

Raises when it doesn't
```
In [8]: s[0:4:2] = list(range(27))
ValueError: cannot set using a slice indexer with a different length than the value

```