python / cpython

The Python programming language
https://www.python.org/
Other
59.96k stars 29.02k forks source link

PyDict_UpdateFromSeq2() unused #35717

Closed d21744ff-f396-4c71-955e-7dbd2e886779 closed 22 years ago

d21744ff-f396-4c71-955e-7dbd2e886779 commented 22 years ago
BPO 491415
Nosy @gvanrossum, @tim-one

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = 'https://github.com/tim-one' closed_at = created_at = labels = ['interpreter-core'] title = 'PyDict_UpdateFromSeq2() unused' updated_at = user = 'https://bugs.python.org/nnorwitz' ``` bugs.python.org fields: ```python activity = actor = 'tim.peters' assignee = 'tim.peters' closed = True closed_date = None closer = None components = ['Interpreter Core'] creation = creator = 'nnorwitz' dependencies = [] files = [] hgrepos = [] issue_num = 491415 keywords = [] message_count = 6.0 messages = ['8097', '8098', '8099', '8100', '8101', '8102'] nosy_count = 3.0 nosy_names = ['gvanrossum', 'tim.peters', 'nnorwitz'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue491415' versions = ['Python 2.2'] ```

d21744ff-f396-4c71-955e-7dbd2e886779 commented 22 years ago
static int PyDict_UpdateFromSeq2() in
Objects/dictobject.c is not used.  
Should it be used or removed?
gvanrossum commented 22 years ago

Logged In: YES user_id=6380

Tim? It's static but the name looks public???

tim-one commented 22 years ago

Logged In: YES user_id=31435

PyDict{Update,Merge}FromSeq2 are parallel to PyDict {Update,Merge}, taking a sequence of 2-sequences instead of a dict. The former are both static, and unadvertised in the header file, just because it wasn't clear to me at the time whether we wanted to bloat the public API with them, and I wanted to move on to the next bug. If you care to pronounce that they're not public API material, happy to rename merge2 and nuke update2 (or, if they are, to make them extern and advertise them).

gvanrossum commented 22 years ago

Logged In: YES user_id=6380

let's talk tomorrow.

gvanrossum commented 22 years ago

Logged In: YES user_id=6380

OK, let's make PyDict_MergeFromSeq2 public, and nuke PyDict_UpdateFromSeq2. (If I had to do it over again, I wouldn't make PyDict_Update public, but only PyDict_Merge -- but that's too late.)

tim-one commented 22 years ago

Logged In: YES user_id=31435

Closed by

Doc/api/concrete.tex; new revision: 1.5 Include/dictobject.h; new revision: 2.23 Misc/NEWS; new revision: 1.332 Objects/dictobject.c; new revision: 2.119