This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年11月24日 21:07 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bisect.patch | vstinner, 2016年11月24日 21:07 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg281651 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年11月24日 21:07 | |
Attached patch simplifies the _bisect module: remove _bisect.bisect and _bisect.insort aliases. Aliases are created in Lib/bisect.py. I wrote the patch to prepare the C code for Argument Clinic, see issue #28754. Note: Lib/test/test_bisect.py already contains two unit tests: def test_backcompatibility(self): self.assertEqual(self.module.bisect, self.module.bisect_right) def test_backcompatibility(self): self.assertEqual(self.module.insort, self.module.insort_right) |
|||
| msg281653 - (view) | Author: Julien Palard (mdk) * (Python committer) | Date: 2016年11月24日 21:10 | |
LGTM |
|||
| msg281659 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年11月24日 21:48 | |
Oh, bisect() was renamed to bisect_right() and insort() renamed to insort_right() in the changeset 67b3ac439f64 of Python 2.1. The aliases created for "backward compatibility" are for compatibility with... Python 2.0 :-) The aliases were never deprecated. Maybe we can also remove/rephrase the "backward compatibility" comment. |
|||
| msg281666 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年11月24日 22:35 | |
New changeset 45713818fd81 by Victor Stinner in branch 'default': Issue #28792: Remove aliases from _bisect https://hg.python.org/cpython/rev/45713818fd81 |
|||
| msg281667 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年11月24日 22:42 | |
I pushed quickly my patch, so Julien can rebase his patch on top of that. I like his patch because it changes bisect to use FASTCALL which makes bisect faster! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:40 | admin | set | github: 72978 |
| 2016年11月24日 22:42:50 | vstinner | set | status: open -> closed resolution: fixed |
| 2016年11月24日 22:42:43 | vstinner | set | messages: + msg281667 |
| 2016年11月24日 22:35:45 | python-dev | set | nosy:
+ python-dev messages: + msg281666 |
| 2016年11月24日 21:57:14 | vstinner | set | nosy:
+ xiang.zhang |
| 2016年11月24日 21:57:01 | vstinner | set | nosy:
+ serhiy.storchaka |
| 2016年11月24日 21:48:56 | vstinner | set | messages: + msg281659 |
| 2016年11月24日 21:10:42 | mdk | set | messages: + msg281653 |
| 2016年11月24日 21:07:47 | vstinner | create | |