mercurial/templater.py
changeset 26197 fb6c08a9b40a
parent 26188 662ea52d5dca
child 26215 72aad184f061
equal deleted inserted replaced
26196:3a4620ad4490 26197:fb6c08a9b40a
   425     return templatefilters.indent(firstline + text, indent)
   425     return templatefilters.indent(firstline + text, indent)
   426 
   426 
   427 def get(context, mapping, args):
   427 def get(context, mapping, args):
   428     """:get(dict, key): Get an attribute/key from an object. Some keywords
   428     """:get(dict, key): Get an attribute/key from an object. Some keywords
   429     are complex types. This function allows you to obtain the value of an
   429     are complex types. This function allows you to obtain the value of an
   430     attribute on these type."""
   430     attribute on these types."""
   431     if len(args) != 2:
   431     if len(args) != 2:
   432         # i18n: "get" is a keyword
   432         # i18n: "get" is a keyword
   433         raise error.ParseError(_("get() expects two arguments"))
   433         raise error.ParseError(_("get() expects two arguments"))
   434 
   434 
   435     dictarg = args[0][0](context, mapping, args[0][1])
   435     dictarg = args[0][0](context, mapping, args[0][1])