+
    iL  c                   sJ    R t . ROt^ RIt^ RIHt R tRR ltR	R ltR
R ltR# )z1Various types of useful iterators and generators.N)StringIOc              #  s   "   V x  V P                  4       '       d2   V P                  4        F  pVP                  4        Rj  xL
  K  	  R# R#  L5i)z}Walk over the message tree, yielding each subpart.

The walk is performed in depth-first order.  This method is a
generator.
N)is_multipartget_payloadwalk)Zselfsubparts   & (/usr/lib64/python3.14/email/iterators.pyr   r      sE      J'')G||~%% * %s   AAAAc              #  s   "   V P                  4        F@  pVP                  VR7      p\        V\        4      '       g   K-  \	        V4       Rj  xL
  KB  	  R#  L
5i)zIterate over the parts, returning string payloads line-by-line.

Optional decode (default False) is passed through to .get_payload().
)decodeN)r   r   Z
isinstanceZstrr    )msgr   r   Zpayloads   &&  r   body_line_iteratorr       sJ     
 88:%%V%4gs##(((  )s   9A AAAc              #  s   "   V P                  4        F9  pVP                  4       V8X  g   K  Ve   VP                  4       V8X  g   K5  Vx  K;  	  R# 5i)zIterate over the subparts with a given MIME type.

Use 'maintype' as the main MIME type to match against; this defaults to
"text".  Optional 'subtype' is the MIME subtype to match against; if
omitted, only the main type is matched.
N)r   Zget_content_maintypeZget_content_subtype)r   ZmaintypeZsubtyper   s   &&& r   typed_subpart_iteratorr	   +   sB      88:'')X5'"="="?7"J s   &AA
Ac                s   Vf   \         P                  pRV^,          ,          p\        W@P                  4       ,           RVR7       V'       d$   \        RV P	                  4       ,          VR7       M\        VR7       V P                  4       '       d.   V P                  4        F  p\        WQV^,           V4       K  	  R# R# )zA handy debugging aidNZ Z )Zendfilez [%s])r
   )sysZstdoutZprintZget_content_typeZget_default_typer   r   
_structure)r   ZfpZlevelZinclude_defaultZtabr   s   &&&&  r   r   r   8   s    	zZZ

C	#$$&
&BR8g,,..R82
(GwE!G_= )     )r   r	   r   )F)ZtextN)Ni    F)	Z__doc__Z__all__r   Zior    r   r   r	   r   ) r   r   <module>r      s-   
 8  	&)
>r   