Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_fractions.cpython-311.opt-2.pyc |
�
�Ke�� � �N � d dl mZ d dlmZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZd dlmZm
Z
d dlZd dlmZmZ ej Z G d� de� � Z G d� d e� � Z G d
� dej � � Zd� Z G d
� dej � � Zedk r ej � � dS dS )� )�Decimal)�requires_IEEE_754N)�copy�deepcopy)�dumps�loadsc �J � e Zd Z d� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � ZeZd
S )�
DummyFloatc �\ � t |t � � st d� � �|| _ d S )Nz-DummyFloat can only be initialized from float)�
isinstance�float� TypeError�value��selfr s �=/usr/local/apps/python3/lib/python3.11/test/test_fractions.py�__init__zDummyFloat.__init__ s/ � ��%��'�'� M��K�L�L�L���
�
�
� c �� � t |t j � � r) |t � | j � � |� � S t |t � � r || j |j � � S t S �N)r �numbers�Rational�F�
from_floatr r
�NotImplemented)r �other�ops r �_richcmpzDummyFloat._richcmp se � ��e�W�-�.�.� "��2�a�l�l�4�:�.�.��6�6�6�
��z�
*�
*� "��2�d�j�%�+�.�.�.�!�!r c �B � | � |t j � � S r )r �operator�eq�r r s r �__eq__zDummyFloat.__eq__# � � �D�M�M�%���$E�$E�Er c �B � | � |t j � � S r )r r �ler"