Commits

Tetsuya Morimoto  committed 4c8c295

fixed a function handled itemgetter related to Python 2.4 compatibility

  • Participants
  • Parent commits e6f4ab4

Comments (0)

Files changed (1)

File tests/utils.py

 
 def compat_itemgetter(*args):
     from operator import itemgetter
-    if sys.version_info[:2] == (2, 4):
+    if sys.version_info[:2] == (2, 4) and len(args) != 1:
         return lambda obj: tuple(itemgetter(item)(obj) for item in args)
     else:  # version >= 2.5
         return itemgetter(*args)