관리-도구
편집 파일: parser.cpython-39.opt-2.pyc
a R�f� � @ st g d �Z ddlmZmZ ddlmZmZ ddlmZ G dd� d�Z G dd� de �Z G d d � d �ZG dd� de�Zd S ))�Parser�HeaderParser�BytesParser�BytesHeaderParser� FeedParser�BytesFeedParser� )�StringIO� TextIOWrapper)r r )�compat32c @ s0 e Zd Zd ed�dd�Zddd�Zddd �ZdS ) r N��policyc C s || _ || _d S �N)�_classr )�selfr r � r �1/opt/alt/python39/lib64/python3.9/email/parser.py�__init__ s zParser.__init__Fc C s@ t | j| jd�}|r|�� |�d�}|s,q8|�|� q|�� S )Nr i )r r r Z_set_headersonly�readZfeed�close)r �fp�headersonlyZ feedparser�datar r r �parse) s zParser.parsec C s | j t|�|d�S )N�r )r r �r �textr r r r �parsestr; s zParser.parsestr)N)F)F)�__name__� __module__�__qualname__r r r r r r r r r s r c @ s e Zd Zddd�Zddd�ZdS ) r Tc C s t �| |d�S �NT)r r �r r r r r r r H s zHeaderParser.parsec C s t �| |d�S r )r r r r r r r K s zHeaderParser.parsestrN)T)T)r r r r r r r r r r G s r c @ s( e Zd Zdd� Zd dd�Zd dd�ZdS )r c O s t |i |��| _d S r )r �parser)r �args�kwr r r r Q s zBytesParser.__init__Fc C s6 t |ddd�}z| j�||�W |�� S |�� 0 d S )N�ascii�surrogateescape)�encoding�errors)r r"