#NEWLINE# def pgettext( self , context , message ) : #NEWLINE# #INDENT# "Look up the `context` and `message` id in the catalog and return the\n        corresponding message string, as an 8-bit string encoded with the\n        catalog's charset encoding, if known.  If there is no entry in the\n        catalog for the `message` id and `context` , and a fallback has been\n        set, the look up is forwarded to the fallback's ``pgettext()``\n        method. Otherwise, the `message` id is returned.\n        " #NEWLINE# ctxt_msg_id = ( self . CONTEXT_ENCODING % ( context , message ) ) #NEWLINE# missing = object ( ) #NEWLINE# tmsg = self . _catalog . get ( ctxt_msg_id , missing ) #NEWLINE# if ( tmsg is missing ) : #NEWLINE# #INDENT# if self . _fallback : #NEWLINE# #INDENT# return self . _fallback . pgettext ( context , message ) #NEWLINE# #UNINDENT# return message #NEWLINE# #UNINDENT# if self . _output_charset : #NEWLINE# #INDENT# return text_to_native ( tmsg , self . _output_charset ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . _charset : #NEWLINE# #INDENT# return text_to_native ( tmsg , self . _charset ) #NEWLINE# #UNINDENT# #UNINDENT# return tmsg