BUG: Inconsistency between `Series[bool].__truediv__(list[bool])` and `Series[bool].truediv(list[bool])`
Pandas version checks
-
[x] I have checked that this issue has not already been reported.
-
[x] I have confirmed this bug exists on the latest version of pandas.
-
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
# I am on `main`, 945385d09c5c0ca9ba09336ff7727dbe3349697e
import pandas as pd
pd.Series([True]) / [True] # NotImplementedError: operator 'truediv' not implemented for bool dtypes
[True] / pd.Series([True]) # NotImplementedError: operator 'truediv' not implemented for bool dtypes
pd.Series([True]).truediv([True]) # pd.Series, dtype=float64
pd.Series([True]).rtruediv([True]) # pd.Series, dtype=float64
Issue Description
Series[bool] / list[bool] and list[bool] / Series[bool] are forbidden, but not the method versions.
Expected Behavior
Both approaches should give consistent results or errors
Installed Versions
INSTALLED VERSIONS
commit : f60bf958da887b232834e89af31a0630021b801d python : 3.11.13 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.26200 machine : AMD64 processor : AMD64 Family 25 Model 116 Stepping 1, AuthenticAMD byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : Czech_Czechia.1252
pandas : 3.0.0.dev0+2338.gf60bf958da.dirty numpy : 2.3.4 dateutil : 2.9.0.post0 pip : 24.0 Cython : 3.2.2 sphinx : 8.2.3 IPython : 9.7.0 adbc-driver-postgresql: None adbc-driver-sqlite : None bs4 : 4.14.3 bottleneck : 1.6.0 fastparquet : 2024.11.0 fsspec : 2025.10.0 html5lib : 1.1 hypothesis : 6.148.5 gcsfs : 2025.10.0 jinja2 : 3.1.6 lxml.etree : 6.0.2 matplotlib : 3.10.7 numba : 0.62.1 numexpr : 2.14.1 odfpy : None openpyxl : 3.1.5 psycopg2 : 2.9.11 pymysql : 1.4.6 pyarrow : 22.0.0 pyiceberg : 0.10.0 pyreadstat : 1.3.2 pytest : 9.0.1 python-calamine : None pytz : 2025.2 pyxlsb : 1.0.10 s3fs : 2025.10.0 scipy : 1.16.3 sqlalchemy : 2.0.44 tables : 3.10.2 tabulate : 0.9.0 xarray : 2025.11.0 xlrd : 2.0.2 xlsxwriter : 3.2.9 zstandard : 0.25.0 qtpy : None pyqt5 : None
So,should we just implement the operator versions? If so, I can help.
We need a decision from the core developers before moving on. Series[bool].__truediv__(list[bool]) has just been banned recently.
OK, got it.
With this series of reports, I am often wondering how much this is impacting users versus just in the name of armchair-consistency. In any case, I do think it'd be helpful to summarize the issues across all ops/dtypes rather than open one issue at a time. Would you be up for that @cmp0xff?
Regarding the current Issue, it arises with the developing main branch of pandas, which crashed the nightly test of pandas-stubs. It is a genuinly new case that cannot be summarised a priori with other Issues in the series.
In terms of their impact on users, these Issues certainly do not arise from typical usage, but from the effort to provide typing hints for regular users in pandas-stubs. Therefore, I would say they have an indirect impact.
These Issues were discovered in the process of completing type hints for arithmetic and logical operations, which is still on-going. Newly discovered Issues need to be recorded publicly. It's fine by for me if such issues are tagged as low-prio quickly. I can create a tracker Issue for all of them once the type hints are more complete.
The dunder method is correct; the non-dunder version should be changed.
Note: In 2.3.3, all of the calls work.
In 3.0rc0, the dunder methods return NotImplemented, but the non-dunder method does not. So that is what should get fixed.