Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/future/backports/urllib/__pycache__/ |
Upload File : |
o ,�]l � @ sp d Z ddlmZmZmZ ddlmZ G dd� de�ZG dd� de�ZG dd � d e�Z G d d� de�Z [[[[dS ) a Response classes used by urllib. The base class, addbase, defines a minimal file-like interface, including read() and readline(). The typical response object is an addinfourl instance, which defines an info() method that returns headers and a geturl() method that returns the url. � )�absolute_import�division�unicode_literals)�objectc @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�addbasez(Base class for addinfo and addclosehook.c C sX || _ | j j| _| j j| _t| j d�r| j j| _t| j d�r%| j j| _d S dd� | _d S )N� readlines�filenoc S s d S �N� r r r �B/usr/lib/python3/dist-packages/future/backports/urllib/response.py�<lambda> s z"addbase.__init__.<locals>.<lambda>)�fp�read�readline�hasattrr r )�selfr r r r �__init__ s zaddbase.__init__c C s t | j�S r )�iterr �r r r r �__iter__ s zaddbase.__iter__c C s d| j jt| �| jf S )Nz<%s at %r whose fp = %r>)� __class__�__name__�idr r r r r �__repr__% s �zaddbase.__repr__c C s>