Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

MCVE for bug with no fallback to `__rmod__` when `__mod__` is not implemented

License

Notifications You must be signed in to change notification settings

lycantropos/pyo3_missing_rmod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In what follows python is an alias for python3.6 or pypy3.6 or any later version (python3.7, pypy3.7 and so on).

Steps to reproduce

Install the latest pip & setuptools packages versions

python -m pip install --upgrade pip setuptools

Build library

python setup.py develop

Open python REPL

python

Execute following statements

>>> from pyo3_missing_rmod import A, B
>>> A() % B()

Expected output:

A.__mod__ is called
B.__rmod__ is called
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: unsupported operand type(s) for %: 'A' and 'B'

Actual output:

A.__mod__ is called
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: 'A' object cannot be converted to 'B'

About

MCVE for bug with no fallback to `__rmod__` when `__mod__` is not implemented

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published