parameters: (self, context)
return_statement: return Decimal(self)
docstring: Decapitate the payload of a NaN to fit the context
docstring_summary: Decapitate the payload of a NaN to fit the context
docstring_tokens: Decapitate the payload of a NaN to fit the context
function: def _fix_nan(self, context):
          """Decapitate the payload of a NaN to fit the context"""
          payload = self._int
  
          # maximum length of payload is precision if clamp=0,
          # precision-1 if clamp=1.
          max_payload_len = context.prec - context.clamp
          if len(payload) > max_payload_len:
              payload = payload[len(payload)-max_payload_len:].lstrip('0')
              return _dec_from_triple(self._sign, payload, self._exp, True)
          return Decimal(self)
function_tokens: def _fix_nan ( self , context ) : payload = self . _int # maximum length of payload is precision if clamp=0, # precision-1 if clamp=1. max_payload_len = context . prec - context . clamp if len ( payload ) > max_payload_len : payload = payload [ len ( payload ) - max_payload_len : ] . lstrip ( '0' ) return _dec_from_triple ( self . _sign , payload , self . _exp , True ) return Decimal ( self )