Hacker GitHub

← All repos

python/cpython

View on GitHub ↗ ★ 77,791 Python

The Python programming language

548 mentions on Hacker News by 400 people: 44 stories, 504 comments · first 2014-12-30 · latest 2026-10-27

Mentions per year 548 mentions · busiest year 2025 (72)
20082026
  1. That sounds like the compilation is accidentally triggering this old frustration [0]. [0] https://github.com/python/cpython/issues/131189
  2. Interesting. You're right. Code pointer: https://github.com/python/cpython/blob/main/Objects/unicodeo... Also implies that Animats is correct that including an emoji in a Python string can bloat the memory consumption by a factor of 4.
    comment by nostrademons · 2025-09-13 · in UTF-8 is a brilliant design
  3. In the CPython reference interpreter, that VM can be found at https://github.com/python/cpython/blob/main/Python/ceval.c It's 3619 lines. It's explained in this 515 line file: https://github.com/python/cpython/blob/main/InternalDocs/ For…
  4. …your own ad-hoc system using loop.call_soon_threadsafe() or use third-party libs like Janus[2]. [1] https://github.com/python/cpython/blob/e4e2390a64593b33d6556... [2] https://github.com/aio-libs/janus
  5. …for children I have always hated that comprehension variables leak for that same reason 1: https://github.com/python/cpython/blob/v3.13.7/Grammar/pytho...
    comment by mdaniel · 2025-08-29 · in Python: The Documentary [video]
  6. …want to behave differently. [1] https://github.com/enthought/Python-2.7.3/blob/master/Lib/Us... [2] https://github.com/python/cpython/issues/105524
  7. …it was was fixed in 2018. That's what it took to not write my own date parsing library. [1] https://github.com/python/cpython/issues/60077
    comment by Animats · 2025-07-26 · in Never write your own date parsing library
  8. Python 3.14 adds strptime() https://github.com/python/cpython/issues/41431 "The new constructor is equivalent to datetime(*(time.strptime(date_string, format)[0:6]))."
    comment by watersb · 2025-07-24 · in Show HN: Easy Python Time Parsing
  9. …I've found that the best way to inspect Python programs with GDB is to use the GDB extensions ( https://github.com/python/cpython/blob/3.13/Tools/gdb/libpyt... ) that the CPython project maintains. It's a bunch of code that tells GDB how…
  10. …idea where anyone got that idea - except for the single actual bug in CPython that is mentioned ( https://github.com/python/cpython/issues/54753 ). I don't feel strongly about Python, but I do think CPython is a great way for people to…
    comment by harrisi · 2025-07-19 · in What the Fuck Python
  11. Nice. Looks like I was looking at an old version of the file. https://github.com/python/cpython/commit/09ba98436444d2a4e11...
  12. …Come again? def uuid4(): """Generate a random UUID.""" return UUID(bytes=os.urandom(16), version=4) https://github.com/python/cpython/blob/3.13/Lib/uuid.py
  13. …it does not incorporate RFC9110 which renames some status codes which previously were WebDAV-only: https://github.com/python/cpython/pull/117611
    comment by roywashere · 2025-07-11 · in Series of posts on HTTP status codes (2018)
  14. …like you said. If you're interested, it's slowly becoming more like lazy basic block versioning https://github.com/python/cpython/issues/128939 You did great work on YJIT, and I am quite thankful for that.
  15. …that reads insane to anyone doing actual work, like the "maintenance burden" of the cgi module: https://github.com/python/cpython/commits/3.12/Lib/cgi.py Turns out most maintenance this thing received is the various attempts of removing it.
  16. https://github.com/python/cpython/blob/847d1c2cb4014f122df64... . i686 is Windows only. I see there's a warning about this later if you're unsupported and therefore a 0 case, but either this becomes an error later on or they softened the…
  17. …https://github.com/mozilla-firefox/firefox https://github.com/torvalds/linux https://github.com/python/cpython
  18. …so small they put it in a lookup table [2]. It is a strange and very unequal choice for a demo. [1] https://github.com/python/cpython/blob/0d9d48959e050b66cb37a... [2] https://github.com/python/cpython/blob/0d9d48959e050b66cb37a...
    comment by mkl · 2025-06-23 · in Python can run Mojo now
  19. Reported as < https://github.com/python/cpython/issues/135835 >.
  20. …randomize iteration In fact, we see this with CPython `set`, controlled by `_Py_HashSecret`: https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b... https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b...…
  21. Cool, but looks like it's going to miss capabilities, so not suitable for a full OS backup (see https://github.com/python/cpython/issues/113293 )
  22. …parsers and PEG grammars e.g. https://github.com/llvm/llvm-project/blob/llvmorg-20.1.5/cla... and https://github.com/python/cpython/blob/v3.13.3/Grammar/pytho...
  23. …being real ones is just comical. Even the standard library is barely typed, so they give no fucks https://github.com/python/cpython/blob/v3.13.3/Lib/re/__init... What does it accept? Who knows. What does it return? Don't worry about it
  24. …a concrete proposal, it's likely worth shopping around at https://discuss.python.org/c/ideas/6 or https://github.com/python/cpython/issues/ .
    comment by zahlman · 2025-05-17 · in The first year of free-threaded Python
  25. …I can’t decipher either one [1, 2] from the first glance – maybe if I get some more sleep? [1]: https://github.com/python/cpython/blob/3.13/Lib/collections/... [2]: https://github.com/python/cpython/blob/3.13/Lib/typing.py#L2...
    comment by notpushkin · 2025-05-16 · in The first year of free-threaded Python
  26. …we parsing the Python code into an AST? CPython uses a generated parser. The grammar is defined in https://github.com/python/cpython/blob/main/Grammar/python.g... which is used to generate the specification at…
  27. There is a formal grammar defined in the CPython repo, implemented in a language called ASDL: https://github.com/python/cpython/blob/main/Parser/Python.as... ty uses the same AST and parser as ruff. We don't use the ASDL grammar directly,…
  28. …already done all this work. CPython's struct module is just a shim importing the C implementations: https://github.com/python/cpython/blob/main/Lib/struct.py Pypy's is a Python(-ish) implementation, leveraging primitives from its own rlib…
  29. …and issues with documentation can also be reported on the main Python GitHub issue tracker ( https://github.com/python/cpython/labels/docs ).
    comment by zahlman · 2025-04-23 · in Advanced Python Features
  30. …because it would been a Python 3 str-style debacle if ints and bools were not interchangeable. [0] https://github.com/python/cpython/blob/main/Objects/boolobje...
    comment by hermitdev · 2025-04-22 · in Python’s new t-strings
  31. …the first time I've seen "nonlocal". In the ~100 packages I have installed, I see 0 usages! [1] https://github.com/python/cpython/blob/a6a3dbb7db0516a72c5ef...
    comment by nomel · 2025-04-22 · in Python’s new t-strings
  32. From https://github.com/python/cpython/issues/99108#issue-1436673... : > As evidenced by the recent SHA3 buffer overflow, cryptographic primitives are tricky to implement correctly. There might be issues with memory management, exceeding…
  33. …post) and should be included in all the currently supported versions (>=3.9) of Python [2]. [0] https://github.com/python/cpython/blob/main/Doc/whatsnew/3.1... [1] https://peps.python.org/pep-0745/ [2] https://devguide.python.org/versions/
  34. …tps://github.com/pyca/cryptography/issues/9185 Edit: Found a relevant issue, "closed as not planned": https://github.com/python/cpython/issues/82198
  35. …code for CPU autodetection bear in mind that performance is tricky -- see my comment about NEON https://github.com/python/cpython/pull/119316#issuecomment-2...
  36. More context here. https://github.com/python/cpython/issues/99108#issuecomment-...
  37. …bugs and thus greater security assurance. If you look at the original bug that spawned this work ( https://github.com/python/cpython/issues/99108 ), the poster reported: """As evidenced by the recent SHA3 buffer overflow, cryptographic…
  38. …default implementation of datetime in cpython is a C module (with a fallback to pure python one) https://github.com/python/cpython/blob/main/Modules/_datetim... Not saying it's necessarily justified in case of this library, but if they…
  39. …want to compile multiple versions of Python from source and then make venvs based off of them - see https://github.com/python/cpython/issues/106045 .
  40. …dispatch first and then end up with a similar sort of int comparison in `long_richcompare`. [2] [1] https://github.com/python/cpython/blob/561965fa5c8314dee5b86... [2] https://github.com/python/cpython/blob/561965fa5c8314dee5b86...
  41. …[1] bring any improvement, or does it merely complicate the source? Should it not be removed? [1] https://github.com/python/cpython/pull/128718
  42. Yes, I found a loop performance regression [0] in 3.12 and 3.13. [0]: https://github.com/python/cpython/issues/123540
  43. If you are curious about how Python's string interning works: https://github.com/python/cpython/blob/main/InternalDocs/str...
  44. …by default. "why venv install old pip?" re: `python -m ensurepip && python -m pip install -U pip` https://github.com/python/cpython/issues/74813
  45. …only understood NULLs correctly when using QUOTE_NOTNULL, which was added to Python just last year: https://github.com/python/cpython/issues/113732 I've also heard of a fun database where the user "Geoffrey" was truncated to "G". I wonder…
  46. …OCaml https://github.com/ocaml/ocaml/blob/trunk/Makefile Python https://github.com/python/cpython/blob/main/Makefile.pre.in Haskell https://github.com/ghc/ghc/blob/master/ghc/Makefile R https://github.com/wch/r-source/blob
    comment by dumah · 2025-01-31 · in A better build system for OCaml
  47. …in its official tooling. 1: https://github.com/google/flatbuffers/blob/master/src/idl_ge... 2: https://github.com/python/cpython/issues/94675
  48. …library; the standard library `ensurepip` (called from `venv`) includes a vendored wheel for Pip ( https://github.com/python/cpython/tree/main/Lib/ensurepip/_b... ), and imports Pip from within that wheel to bootstrap it. (Wheels are zip…
  49. …the table. So it'll know that 40 is not in the set without having to jump up into `__eq__`**. [1] https://github.com/python/cpython/blob/main/Objects/setobjec... * Note that the actual implementation will place bucket conflicts in the next…
    comment by daxfohl · 2025-01-11 · in Why is hash(-1) == hash(-2) in Python?
  50. …This is in part thanks to algorithmic improvements implemented at least partially in Python ( https://github.com/python/cpython/blob/main/Lib/_pylong.py#L... ). But I can also see improved performance even for only a couple hundred digits…