def _resp_charset_property():
 def getter(self):
  if ('; charset=' in self.headers['content-type']):
   return self.headers['content-type'].split('; charset=')[1]
 def setter(self, value):
  if ('content-type' in self.headers):
   self.headers['content-type'] = self.headers['content-type'].split(';')[0]
   if value:
    self.headers['content-type'] += ('; charset=' + value)
 return property(getter, setter, doc='Retrieve and set the response charset')

def _resp_charset_property ( ) : def getter ( self ) : if ( '; charset=' in self . headers [ 'content-type' ] ) : return self . headers [ 'content-type' ] . split ( '; charset=' ) [ 1 ] def setter ( self , value ) : if ( 'content-type' in self . headers ) : self . headers [ 'content-type' ] = self . headers [ 'content-type' ] . split ( ';' ) [ 0 ] if value : self . headers [ 'content-type' ] += ( '; charset=' + value ) return property ( getter , setter , doc = 'Retrieve and set the response charset' )
set and retrieve response .