Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Weird PriorityQueue description #101777

Closed
Labels
docsDocumentation in the Doc dir
@pochmann

Description

@pochmann

Documentation

Someone askedDoes PriorityQueue call sorted every time get is called?. First I laughed, how did they come up with that silly idea, but then I saw they got it fromthe doc and it really does make it sound like that:

The lowest valued entries are retrieved first (the lowest valued entry is the one returned bysorted(list(entries))[0]).

Not onlysorted but alsolist first, and of course even if the queue didn't use a heap, it should be the straightforwardmin(entries) instead. This is so over-the-top inefficient and complicated that it looks like a weird joke.

Unless there's good reason for it, I suggest to add "as if" and usemin:

The lowest valued entries are retrieved first (the lowest valued entry is the one as if returned bymin(entries)).

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp