Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
python
/
cpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
36.8k
Star
77.3k
Code
Issues
5k+
Pull requests
2.7k
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Commits
Breadcrumbs
History for
cpython
Lib
heapq.py
on
3.8
User selector
All users
Datepicker
All time
Commit history
Commits on Jun 1, 2019
bpo-29984: Improve 'heapq' test coverage (GH-992)
rkday
authored and
rhettinger
committed
664fe39
View commit details
Copy full SHA for 664fe39
View code at this point
Browse repository at this point
Commits on Jul 24, 2018
bpo-34149: Behavior of the min/max with key=None (GH-8328)
Show description for e22072f
Amper
authored and
rhettinger
committed
e22072f
View commit details
Copy full SHA for e22072f
View code at this point
Browse repository at this point
Commits on Sep 4, 2017
Improve clarity (and small speed-up) by using tuple unpacking (#3289)
rhettinger
authored
1bfbe78
View commit details
Copy full SHA for 1bfbe78
View code at this point
Browse repository at this point
Commits on Apr 15, 2016
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
Show description for 6245cb3
vadmium
committed
6245cb3
View commit details
Copy full SHA for 6245cb3
View code at this point
Browse repository at this point
Commits on Oct 19, 2014
Issue #22186: Fix typos in Lib/.
Show description for 1ed2e69
berkerpeksag
committed
1ed2e69
View commit details
Copy full SHA for 1ed2e69
View code at this point
Browse repository at this point
Commits on Jun 15, 2014
Update comment to reflect using the default parameter with min() and max().
rhettinger
committed
354bffa
View commit details
Copy full SHA for 354bffa
View code at this point
Browse repository at this point
Commits on Jun 14, 2014
Factor common code into internal functions.
Show description for 48f68d0
rhettinger
committed
48f68d0
View commit details
Copy full SHA for 48f68d0
View code at this point
Browse repository at this point
Fix typo
rhettinger
committed
b321e79
View commit details
Copy full SHA for b321e79
View code at this point
Browse repository at this point
Commits on Jun 2, 2014
Fix comment
rhettinger
committed
7df3c15
View commit details
Copy full SHA for 7df3c15
View code at this point
Browse repository at this point
Minor clean-ups.
rhettinger
committed
450ed10
View commit details
Copy full SHA for 450ed10
View code at this point
Browse repository at this point
Commits on May 30, 2014
Issue #13742: Add key and reverse parameters to heapq.merge()
rhettinger
committed
35db439
View commit details
Copy full SHA for 35db439
View code at this point
Browse repository at this point
Commits on May 27, 2014
Minor clean-ups for heapq.merge().
rhettinger
committed
ab09c13
View commit details
Copy full SHA for ab09c13
View code at this point
Browse repository at this point
Commits on May 26, 2014
Minor clean-ups for heapq.
rhettinger
committed
41331e8
View commit details
Copy full SHA for 41331e8
View code at this point
Browse repository at this point
Commits on May 19, 2014
Small code and comment cleanups
rhettinger
committed
356902d
View commit details
Copy full SHA for 356902d
View code at this point
Browse repository at this point
Commits on May 11, 2014
Issue 21424: Apply the nlargest() optimizations to nsmallest() as well.
rhettinger
committed
234fb2d
View commit details
Copy full SHA for 234fb2d
View code at this point
Browse repository at this point
Issue #21424: Optimize heaqp.nlargest() to make fewer tuple comparisons.
Show description for 277842e
rhettinger
committed
277842e
View commit details
Copy full SHA for 277842e
View code at this point
Browse repository at this point
Commits on Apr 10, 2014
Update comment for the comparison table to use measured results rather than predicted.
rhettinger
committed
6ed7c20
View commit details
Copy full SHA for 6ed7c20
View code at this point
Browse repository at this point
Add algorithmic notes for nsmallest() and nlargest().
rhettinger
committed
2aad6ef
View commit details
Copy full SHA for 2aad6ef
View code at this point
Browse repository at this point
Commits on Mar 26, 2014
Broaden the early-out test for nsmallest and nlargest
rhettinger
committed
8f2420c
View commit details
Copy full SHA for 8f2420c
View code at this point
Browse repository at this point
Commits on Sep 11, 2013
Issue #18962: Optimize the single iterator case for heapq.merge()
Show description for f276232
rhettinger
committed
f276232
View commit details
Copy full SHA for f276232
View code at this point
Browse repository at this point
Commits on Jul 4, 2013
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
brettcannon
committed
cd171c8
View commit details
Copy full SHA for cd171c8
View code at this point
Browse repository at this point
Commits on Jun 14, 2013
Issue #18200: Update the stdlib (except tests) to use
Show description for 0a14066
brettcannon
committed
0a14066
View commit details
Copy full SHA for 0a14066
View code at this point
Browse repository at this point
Commits on Mar 5, 2013
Fix typo
rhettinger
committed
2e8d9a7
View commit details
Copy full SHA for 2e8d9a7
View code at this point
Browse repository at this point
Issue #16098: Update heapq.nsmallest to use the same algorithm as nlargest.
Show description for f6b2667
rhettinger
committed
f6b2667
View commit details
Copy full SHA for f6b2667
View code at this point
Browse repository at this point
Commits on Oct 30, 2011
Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case.
rhettinger
committed
e584457
View commit details
Copy full SHA for e584457
View code at this point
Browse repository at this point
Commits on Apr 20, 2011
Merge 3.1
merwok
committed
37e6c54
View commit details
Copy full SHA for 37e6c54
View code at this point
Browse repository at this point
Commits on Apr 15, 2011
Minor tweaks to a few comments in heapq
merwok
committed
395ba35
View commit details
Copy full SHA for 395ba35
View code at this point
Browse repository at this point
Commits on Apr 13, 2011
Issue 3051: make pure python code pass the same tests as the C version.
rhettinger
committed
8a9c4d9
View commit details
Copy full SHA for 8a9c4d9
View code at this point
Browse repository at this point
Commits on Jul 4, 2010
Remove coding cookie from heapq.py.
mdickinson
committed
b4a17a8
View commit details
Copy full SHA for b4a17a8
View code at this point
Browse repository at this point
Commits on Mar 29, 2009
Make life easier for non-CPython implementations
rhettinger
committed
0dd737b
View commit details
Copy full SHA for 0dd737b
View code at this point
Browse repository at this point
Commits on Feb 21, 2009
In Py3.x, a list comprehension is now faster than list(map(itemgetter(0), iterable)).
rhettinger
committed
ba86fa9
View commit details
Copy full SHA for ba86fa9
View code at this point
Browse repository at this point
Port r69838: Speedup and simplify negative counter using count's new step argument.
rhettinger
committed
bd171bc
View commit details
Copy full SHA for bd171bc
View code at this point
Browse repository at this point
Commits on Feb 6, 2009
Merged revisions 69129-69131,69139-69140,69143,69154-69159,69169,69288-69289,69293,69297-69301,69348 via svnmerge from
Show description for 5c6d787
benjaminp
committed
5c6d787
View commit details
Copy full SHA for 5c6d787
View code at this point
Browse repository at this point
Commits on Jan 27, 2009
Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from
Show description for a56c467
mdickinson
committed
a56c467
View commit details
Copy full SHA for a56c467
View code at this point
Browse repository at this point
Commits on Jan 23, 2009
Merged revisions 68750,68776-68777,68811,68842,68859 via svnmerge from
Show description for aa06900
benjaminp
committed
aa06900
View commit details
Copy full SHA for aa06900
View code at this point
Browse repository at this point
Previous
Next
You can’t perform that action at this time.