Harsh Patel <ha...@nyu.edu> added the comment:
This ticket is not intended to rename heapify method in the stdlib (its too late for that). This is to merely add a clarification in the docs to state that heapify here has a different connotation than what's used in standard algorithmic literature (CLRS, Sedgewick etc). See here https://xlinux.nist.gov/dads/HTML/heapify.html References: https://algs4.cs.princeton.edu/24pq/ http://math.utoledo.edu/~codenth/Fall_16/4380/heap-hw.pdf On Fri, Feb 14, 2020 at 2:00 PM Steven D'Aprano <rep...@bugs.python.org> wrote: > > Steven D'Aprano <steve+pyt...@pearwood.info> added the comment: > > The "-ify" or "-fy" suffix in English means "to make". For example, > "amplify", "magnify", "terrify", etc. > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wiktionary.org_wiki_-2Dify&d=DwIFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=owI_YZl60rgj74U9tzqxcA&m=jUulcI-27ChSIukpI4uzg0LktqA5zRt9HI8Lz0JxRYU&s=o95nXSmjNMCHMbmoWeL7LildI9qwEdnusnlAOenreQ4&e= > > So heapify literally means "make into a heap". Not only is the name > correct, but it is a better name for an in-place operation than either of > the terms you give: > > * "build-heap" does not describe an in-place operation; > * "make-heap" is ambiguous in whether it is in-place or not. > > But even if we agreed that the name needs to change to match text books > (which text books?), since heapify is a public function, we cannot just > change the name. We would have to keep the old name around for many, many > years, possibly forever. > > ---------- > nosy: +steven.daprano > > _______________________________________ > Python tracker <rep...@bugs.python.org> > < > https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.python.org_issue39634&d=DwIFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=owI_YZl60rgj74U9tzqxcA&m=jUulcI-27ChSIukpI4uzg0LktqA5zRt9HI8Lz0JxRYU&s=kE5QfuakDzLUOPpeWAGCf7Z0zJeeeC1iDUSj-bMFzrE&e= > > > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39634> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com