
    h                     (   S r SSKrSSKrSSKrSSKJrJr  SSK	J
r
  SSK	Jr  SSKJr  SSKJrJrJrJrJrJrJr  \R.                  " S	\5        / S
Qr " S S\5      r\r\r\r\R>                  r\R@                  r \!r!\"r"\#=r#r$\%r&\r'\(r(\r)S r*SS jr+g)z"Python 2/3 compat layer leftovers.    N)redirect_stderrredirect_stdout)BytesIO)StringIO)SimpleNamespace   )Tagbytechrbyteord	bytesjoinstrjointobytestostrzeThe py23 module has been deprecated and will be removed in a future release. Please update your code.)
basestringr
   r   r   r   open	Py23ErrorrangeRecursionErrorroundr   r   r   r	   r   r   	tounicodeunichrunicode	UnicodeIOxrangezipc                       \ rS rSrSrg)r   -    N)__name__
__module____qualname____firstlineno____static_attributes__r       E/var/www/html/env/lib/python3.13/site-packages/fontTools/misc/py23.pyr   r   -   s    r$   r   c                      [        S5      e)Nz-'xrange' is not defined. Use 'range' instead.)r   )argskwargss     r%   r   r   A   s    
C
DDr$   c                 >   Uc  SnUS:  a3  SU* -  n[        X5      u  p4XBS-  :  a  U S:  a  US-  n[        X2-  5      $ [        R                  " S5      U* -  n[        R                  R	                  U 5      R                  U[        R                  S9n[        U5      $ )a  
Implementation of Python 2 built-in round() function.
Rounds a number to a given precision in decimal digits (default
0 digits). The result is a floating point number. Values are rounded
to the closest multiple of 10 to the power minus ndigits; if two
multiples are equally close, rounding is done away from 0.
ndigits may be negative.
See Python 2 documentation:
https://docs.python.org/2/library/functions.html?highlight=round#round
r   
      r   10)rounding)divmodfloat_decimalDecimal
from_floatquantizeROUND_HALF_UP)numberndigitsexponentquotient	remainderds         r%   round2r;   E   s     {7(#$V6A%&A+MHX())##D)wh7''/88x55 9 
 Qxr$   )N),__doc__decimalr0   math_mathwarnings
contextlibr   r   ior   r   r   typesr   	textToolsr	   r
   r   r   r   r   r   warnDeprecationWarning__all__NotImplementedErrorr   r   strr   iscloseisfiniter   r   r   round3chrr   r   r   r   r   r;   r   r$   r%   <module>rN      s    (    7  $ ! P P P 4	# 	  

-->> 	
		Er$   