Revision eb62069e lib/compat.py

b/lib/compat.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2010 Google Inc.
4
# Copyright (C) 2010, 2011 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
24 24
"""
25 25

  
26 26
import itertools
27
import operator
27 28

  
28 29
try:
29 30
  # pylint: disable-msg=F0401
......
143 144
  else:
144 145
    return val
145 146

  
147
#: returns the first element of a list-like value
148
fst = operator.itemgetter(0)
149

  
150
#: returns the second element of a list-like value
151
snd = operator.itemgetter(1)

Also available in: Unified diff