wtfpython VS CPython

Compare wtfpython vs CPython and see what are their differences.

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
wtfpython CPython
56 1,555
36,839 70,429
0.2% 1.2%
8.5 10.0
8 months ago 2 days ago
Python Python
Do What The F*ck You Want To Public License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

wtfpython

Posts with mentions or reviews of wtfpython. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-07-19.
  • What the Fuck Python
    3 projects | news.ycombinator.com | 19 Jul 2025
    Hi, author of the repo (https://github.com/satwikkansal/wtfpython) here, pleasantly surprised to wake up to this thread about it. The intention of the project is not to put Python in a bad light relative to other languages, the intention was to explore it more deeply through (sometimes contrived) snippets that give non-obvious outputs. I believe for a regular Python programmer, the "Slippery Slopes" section is a must-know. The first section (Strain your brain), does contain some patterns that you may not ever see in real world, the goal there is to just learn about internals. Agreed some of them are very obvious for a well-learned programmer, and some of them aren't even Python specific, it does help a lot of beginner to intermediate programmers. I remember it being given as a supplementary material in one of the CS-based course.

    It is curated with something-for-everyone approach, I expect people to learn a thing or two about Python / CS after going through the snippets. I haven't updated it in a while in a major way, but looking at the feedback I'll try to organise them better, and add new snippets (I have a long personal list that I maintain) in a future release!

    1 project | news.ycombinator.com | 7 Jan 2025
  • Wtfpython
    1 project | news.ycombinator.com | 19 Jul 2025
  • Ask HN: Is there any programming language that doesn't have WTFs?
    1 project | news.ycombinator.com | 21 Apr 2025
    After reading this page:

    https://github.com/satwikkansal/wtfpython?tab=readme-ov-file#-needles-in-a-haystack-

    I wonder if there's any language that thought about all edge cases and avoided exceptions and such gotchas at the design level.

    JS is notorious for such WTFs but even Python—which I've used for over a decade now—has surprised me countless times.

    Is Haskell also like that? How about Lisps (CL, Racket, Clojure, Scheme, etc.)?

  • Interview Gone Wrong
    6 projects | news.ycombinator.com | 3 Nov 2024
    In my mind,I just automatically translate a EXPRESSION1 b EXPRESSION2 c as (a EXPRESSION1 b) and (b EXPRESSION2 c), so there's no ambiguity. But I agree, it can be VERY confusing,so I tend to write code that is easy to read without being a master. for example, think what you would have thought this evaluates to:

    False is False is False. If you thought, True, you were right :)

    I would recommend to take a look at one of my favourite repos for more[1].

    [1]https://github.com/satwikkansal/wtfpython

  • Layman's Guide to Python Built-In Functions · Matt Layman
    1 project | news.ycombinator.com | 4 Sep 2024
    See this for an explanation - https://github.com/satwikkansal/wtfpython?tab=readme-ov-file...

    > `all([])` returns True since the iterable is empty.

  • What the Fuck Python?
    1 project | news.ycombinator.com | 27 Aug 2023
  • Valid Python syntax – by Nobody has time for Python
    1 project | news.ycombinator.com | 11 Jun 2023
  • Multidimensional lists creation, why the weird behavior
    1 project | /r/Python | 22 Apr 2023
    Haven’t seen it mentioned in the replies, so here it is. Have a look at “What the f*ck Python? 😱” on GitHub: https://github.com/satwikkansal/wtfpython
  • Wat
    5 projects | news.ycombinator.com | 29 Mar 2023
    https://github.com/satwikkansal/wtfpython

    "Mutating the immutable" is my personal favourite - the second line of code fails with an exception despite having already succeeded:

     >>> t = ([1, 2], 5, 6)

CPython

Posts with mentions or reviews of CPython. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-12-13.
  • What's New in Python 3.15
    1 project | news.ycombinator.com | 21 Dec 2025
    Here's the relevant diff: https://github.com/python/cpython/pull/137968/files#diff-966...

    Search is limited to 20 attributes and non-descriptors only to avoid arbitrary code execution.

    I assume constructing AttributeErrors isn't highly performance sensitive.

  • Ask HN: How do you handle release notes for multiple audiences?
    3 projects | news.ycombinator.com | 13 Dec 2025
    If there is an audience for release notes I haven't seen anything better than just committing entries to pre-release folder as you change things and have release automation compile the folder into the actual release notes. Python and many other large projects handle it like this: https://github.com/python/cpython/tree/main/Misc/NEWS.d/next (The release notes for major releases are crafted manually)
  • Guide - Audio Modding of "Arena of Valor"
    6 projects | dev.to | 5 Dec 2025
    Python Software Foundation. Python Programming Language. https://www.python.org/
  • How to Send an Email in Python
    1 project | dev.to | 4 Dec 2025
    import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email import encoders # SMTP Server details port = 587 smtp_server = "smtp.sendlayer.net" username = "paulie" # Your username generated by SendLayer password = "sendlayer_smtp_password" # Your password generated by SendLayer sender_email = "paulie@example.com" receiver_email = "johndoe@example.com" # Email content subject = "Email Example with Attachment" html_message = """\ Hi, This is a test email sent from "https://www.python.org">Python using "https://sendlayer.com">SendLayer's SMTP server The email also includes an attachment """ # Create a multipart message and set headers message = MIMEMultipart() message["From"] = sender_email message["Subject"] = subject message["To"] = receiver_email # Attach the HTML part message.attach(MIMEText(html_message, "html")) # Specify the file path for the attachment filename = "./path/to/attachment/file.pdf" # Change this to the correct path # Open the file in binary mode with open(filename, "rb") as attachment: part = MIMEBase("application", "octet-stream") part.set_payload(attachment.read()) # Encode file in ASCII characters to send by email encoders.encode_base64(part) # Add header as key/value pair to attachment part part.add_header("Content-Disposition", f"attachment; filename= {filename}") # Add attachment to message message.attach(part) # Send the email with smtplib.SMTP(smtp_server, port) as server: server.starttls() server.login(username, password) server.sendmail(sender_email, receiver_email, message.as_string()) print('Email sent successfully')
  • Python Concurrency: A Guide to Threads, Processes, and Asyncio
    3 projects | dev.to | 25 Nov 2025
    import requests from concurrent.futures import ThreadPoolExecutor URLS = [ "https://www.python.org/", "https://www.djangoproject.com/", "https://flask.palletsprojects.com/", ] def fetch_url(url: str): print(f"Fetching {url}...") response = requests.get(url) print(f"Fetched {url} with status {response.status_code}") return len(response.content) with ThreadPoolExecutor(max_workers=5) as executor: # The map function runs `fetch_url` for each item in URLS results = executor.map(fetch_url, URLS) for url, length in zip(URLS, results): print(f"URL: {url}, Length: {length}")
  • Type hints in Python (4)
    2 projects | dev.to | 25 Nov 2025
    Use KeysView and ValuesView instead of dict_keys and dict_values respectively because type checkers don't support dict_keys and dict_values in _collections_abc.
  • Optimize Python Sorting with One Little Trick
    1 project | dev.to | 19 Nov 2025
    According to the benchmark in the PR that introduced this optimization, sorting a list that consists only of floats rather than a list of floats with even a single integer at the end is almost twice as fast.
  • How to Use UUIDv7 in Python, Django and PostgreSQL
    1 project | news.ycombinator.com | 15 Nov 2025
    If you want to a UUIDv7 key for partitioning your table by date (e.g., one partition per day or month), you need to be able to compute the partition range via the minimal UUIDv7 for a given date.

    There is some discussion whether or not to add helpers for this to Python‘s uuid7 module: https://github.com/python/cpython/issues/130843#issuecomment...

  • How often does Python allocate?
    4 projects | news.ycombinator.com | 1 Nov 2025
    With respect to tagged pointers, there seems to be some recent movements on that front in CPython: https://github.com/python/cpython/issues/132509
  • Python: Is_dir() returns False when called from a path.relative_to(root) result
    1 project | news.ycombinator.com | 25 Oct 2025

What are some alternatives?

When comparing wtfpython and CPython you can also consider the following projects:

rdm - Our regulatory documentation manager. Streamlines 62304, 14971, and 510(k) documentation for software projects.

git - A fork of Git containing Windows-specific patches.

Pycco - Literate-style documentation generator.

RustPython - A Python Interpreter written in Rust

python-small-examples - 告别枯燥,致力于打造 Python 实用小例子,更多Python良心教程见 https://ai-jupyter.com

ipython - Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured

Did you know that Python is
the 2nd most popular programming language
based on number of references?