L i&dZddlZddlZddlZddlmZmZddl m Z ddl m Z ddl mZddlmZmZmZmZmZmZmZej.d egd ZGd d eZeZe Z eZej>Zej@Z e!Z!e"Z"e#xZ#Z$e%Z&eZ'e(Z(eZ)d Z*ddZ+y)z"Python 2/3 compat layer leftovers.N)redirect_stderrredirect_stdout)BytesIO)StringIO)SimpleNamespace)Tagbytechrbyteord bytesjoinstrjointobytestostrzeThe py23 module has been deprecated and will be removed in a future release. Please update your code.) basestringr r rr open Py23ErrorrangeRecursionErrorroundrrr r rr tounicodeunichrunicode UnicodeIOxrangezipc eZdZy)rN)__name__ __module__ __qualname__Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/fontTools/misc/py23.pyrr-sr!rctd)Nz-'xrange' is not defined. Use 'range' instead.)r)argskwargss r"rrAs C DDr!cB|d}|dkr5d| z}t||\}}||dzk\r |dk\r|dz }t||zStjd| z}tjj |j |tj }t|S)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 r10)rounding)divmodfloat_decimalDecimal from_floatquantize ROUND_HALF_UP)numberndigitsexponentquotient remainderds r"round2r8Es{7(#$VX6) A %&A+ MHX())##D)wh7    ' ' / 8 8 x55 9 Qxr!)N),__doc__decimalr-math_mathwarnings contextlibrriorrrtypesr textToolsr r r r r rrwarnDeprecationWarning__all__NotImplementedErrorrrstrriscloseisfiniterrrround3chrrrrrrr8r r!r"rKs(7$!PPP    4 #     -- >>       Er!