(self, cls=None)
return copy
Returns a copy of self.
Returns a copy of self.
Returns a copy of self .
def copy(self, cls=None):
        ''' Returns a copy of self. '''
        cls = cls or BaseResponse
        assert issubclass(cls, BaseResponse)
        copy = cls()
        copy.status = self.status
        copy._headers = dict((k, v[:]) for (k, v) in self._headers.items())
        if self._cookies:
            copy._cookies = SimpleCookie()
            copy._cookies.load(self._cookies.output(header=''))
        return copy
def copy ( self , cls = None ) : cls = cls or BaseResponse assert issubclass ( cls , BaseResponse ) copy = cls ( ) copy . status = self . status copy . _headers = dict ( ( k , v [ : ] ) for ( k , v ) in self . _headers . items ( ) ) if self . _cookies : copy . _cookies = SimpleCookie ( ) copy . _cookies . load ( self . _cookies . output ( header = '' ) ) return copy