From c80d727e374321573bb00e23876a67c77ff466e3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 13:48:29 +0100 Subject: Bumped version, updated changelog, reduced code smell There is more work to do though, as many imports are still incorrect. Also, there are still print statements --- git/odict.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'git/odict.py') diff --git a/git/odict.py b/git/odict.py index c4c80499..c505b7fd 100644 --- a/git/odict.py +++ b/git/odict.py @@ -616,8 +616,7 @@ class OrderedDict(dict): TypeError: pop expected at most 2 arguments, got 3 """ if len(args) > 1: - raise TypeError, ('pop expected at most 2 arguments, got %s' % - (len(args) + 1)) + raise TypeError('pop expected at most 2 arguments, got %s' % (len(args) + 1)) if key in self: val = self[key] del self[key] @@ -1199,7 +1198,7 @@ class Values(object): keys = self._main._sequence[index] if len(keys) != len(value): raise ValueError('attempt to assign sequence of size %s ' - 'to slice of size %s' % (len(name), len(keys))) + 'to slice of size %s' % (len(value), len(keys))) # FIXME: efficiency? Would be better to calculate the indexes # directly from the slice object # NOTE: the new keys can collide with existing keys (or even @@ -1511,7 +1510,7 @@ class SequenceOrderedDict(OrderedDict): def __setattr__(self, name, value): """Protect keys, items, and values.""" - if not '_att_dict' in self.__dict__: + if '_att_dict' not in self.__dict__: object.__setattr__(self, name, value) else: try: -- cgit v1.2.1