Message389912
> OpenWrapper was added in ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (issue1267) and was only used to set __builtin__.open
It is useless in CPython, since CPython always use the C implementation of the io module, and in the io module, io.OpenWrapper is just an alias to io.open.
$ python3
Python 3.9.2 (default, Feb 20 2021, 00:00:00)
>>> import io
>>> io.OpenWrapper is io.open
True
> (I suppose that at thet moment dumbdbm.py still set open as a class attribute).
I failed to find where in Lib/dbm/dumb.py the open() function is used to define a method. Maybe the code changed since OpenWrapper was added?
At commit ce3a72aec6eaa0293c397c8d0407f7afe0072b2f, the io module was only implemented in Python (Lib/io.py, _io exist didn't exist). It was reimplemented in C in Python 3.1. |
|
Date |
User |
Action |
Args |
2021-03-31 14:57:06 | vstinner | set | recipients:
+ vstinner, gvanrossum, christian.heimes, methane, serhiy.storchaka |
2021-03-31 14:57:06 | vstinner | set | messageid: <1617202626.86.0.983635586522.issue43680@roundup.psfhosted.org> |
2021-03-31 14:57:06 | vstinner | link | issue43680 messages |
2021-03-31 14:57:06 | vstinner | create | |
|