← Back
Editing: roots.cpython-38.pyc
U W[� � @ s� d Z ddlmZmZ ddlmZ ddlmZ G dd� de�Z eG dd� d��Z eG d d � d ��ZeG dd� d��ZG d d� de �ZG dd� de�ZG dd� de�ZG dd� de�ZdS )zf Twisted Python Roots: an abstract hierarchy representation for Twisted. Maintainer: Glyph Lefkowitz � )�absolute_import�division)�reflect)� _oldStylec @ s e Zd ZdZdS )�NotSupportedErrorzv An exception meaning that the tree-manipulation operation you're attempting to perform is not supported. N��__name__� __module__�__qualname__�__doc__� r r �6/usr/lib/python3/dist-packages/twisted/python/roots.pyr s r c @ s$ e Zd ZdZdZdd� Zdd� ZdS )�Requestz�I am an abstract representation of a request for an entity. I also function as the response. The request is responded to by calling self.write(data) until there is no data left and then calling self.finish(). Nc C s t dt�| j� ��dS )z7Add some data to the response to this request. z%s.writeN��NotImplementedErrorr �qual� __class__)�self�datar r r �write% s z Request.writec C s t dt�| j� ��dS )zXThe response to this request is finished; flush all data to the network stream. z %s.finishNr �r r r r �finish* s zRequest.finish)r r r r ZwireProtocolr r r r r r r s r c @ s e Zd ZdZdd� ZdS )�EntityaZ I am a terminal object in a hierarchy, with no children. I represent a null interface; certain non-instance objects (strings and integers, notably) are Entities. Methods on this class are suggested to be implemented, but are not required, and will be emulated on a per-protocol basis for types which do not handle them. c C s t dt�| j� ��dS )zw I produce a stream of bytes for the request, by calling request.write() and request.finish(). z %s.renderNr �r �requestr r r �render<