parameters: (environment, attribute, postprocess=None)
return_statement: return attrgetter
docstring: Returns a callable that looks up the given attribute from a
      passed object with the rules of the environment.  Dots are allowed
      to access attributes of attributes.  Integer parts in paths are
      looked up as integers.
docstring_summary: Returns a callable that looks up the given attribute from a
      passed object with the rules of the environment.  Dots are allowed
      to access attributes of attributes.  Integer parts in paths are
      looked up as integers.
docstring_tokens: Returns a callable that looks up the given attribute from a passed object with the rules of the environment . Dots are allowed to access attributes of attributes . Integer parts in paths are looked up as integers .
function: def make_attrgetter(environment, attribute, postprocess=None):
      """Returns a callable that looks up the given attribute from a
      passed object with the rules of the environment.  Dots are allowed
      to access attributes of attributes.  Integer parts in paths are
      looked up as integers.
      """
      if attribute is None:
          attribute = []
      elif isinstance(attribute, string_types):
          attribute = [int(x) if x.isdigit() else x for x in attribute.split('.')]
      else:
          attribute = [attribute]
  
      def attrgetter(item):
          for part in attribute:
              item = environment.getitem(item, part)
  
          if postprocess is not None:
              item = postprocess(item)
  
          return item
  
      return attrgetter
function_tokens: def make_attrgetter ( environment , attribute , postprocess = None ) : if attribute is None : attribute = [ ] elif isinstance ( attribute , string_types ) : attribute = [ int ( x ) if x . isdigit ( ) else x for x in attribute . split ( '.' ) ] else : attribute = [ attribute ] def attrgetter ( item ) : for part in attribute : item = environment . getitem ( item , part ) if postprocess is not None : item = postprocess ( item ) return item return attrgetter