Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor py3 #23

Merged
merged 9 commits into from
Jul 1, 2023
Merged

Refactor py3 #23

merged 9 commits into from
Jul 1, 2023

Conversation

nvictus
Copy link
Owner

@nvictus nvictus commented Jun 30, 2023

  • Drop py2 support
  • Remove PQDict alias
  • Inline type annotations and remove pyi file.
  • Use backwards-compatible type machinery
  • Make minpq and maxpq classmethod constructors and deprecate the functions
  • Update docs
  • Update tests
  • Update CI

API changes:

  • top: Add a default arg to return when the PQ is empty
  • pop(): Support default when using pop() with PQ semantics (returns default as key when the PQ is empty).
  • Add popvalue() method to mirror topvalue()

pqdict/__init__.py Outdated Show resolved Hide resolved
@nvictus nvictus merged commit ef8cfbc into master Jul 1, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants