STINNER Victor <vstin...@python.org> added the comment:
I managed to test my PR with numpy: $ env/bin/python >>> import fractions >>> import numpy >>> f=fractions.Fraction(numpy.int64(1*3), numpy.int64(2*3)) >>> f Fraction(1, 2) >>> type(f.numerator) <class 'numpy.int64'> >>> type(f.denominator) <class 'numpy.int64'> So it works as expected: numerator and denominator have the expected type, and there is no exception ;-) I used the following commands to get numpy in a Python 3.9 virtual environment: ./python -m venv env env/bin/python -m pip install https://github.com/cython/cython/archive/master.tar.gz --install-option="--no-cython-compile" curl -O https://files.pythonhosted.org/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip unzip -d . numpy-1.18.1.zip cd numpy-1.18.1/ ../env/bin/python setup.py install ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39350> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com