diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-04 10:59:27 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-04 10:59:27 -0500 |
| commit | d6e8d5eddbca7154d008f7ef49efdc62dded7794 (patch) | |
| tree | f535b34e9e7d3210c57c2cd3038070495e731d42 /lib/sqlalchemy/ext | |
| parent | f3becf64df3937f70c2d0269255d082b27ec4f2d (diff) | |
| download | sqlalchemy-d6e8d5eddbca7154d008f7ef49efdc62dded7794.tar.gz | |
- Fixed bug in association proxy where assigning an empty slice
(e.g. ``x[:] = [...]``) would fail on Py3k.
Diffstat (limited to 'lib/sqlalchemy/ext')
| -rw-r--r-- | lib/sqlalchemy/ext/associationproxy.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py index a4786de42..045645f86 100644 --- a/lib/sqlalchemy/ext/associationproxy.py +++ b/lib/sqlalchemy/ext/associationproxy.py @@ -540,11 +540,12 @@ class _AssociationList(_AssociationCollection): stop = index.stop step = index.step or 1 + start = index.start or 0 rng = list(range(index.start or 0, stop, step)) if step == 1: for i in rng: - del self[index.start] - i = index.start + del self[start] + i = start for item in value: self.insert(i, item) i += 1 |
