Adding C-style for loops to Python for fun

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
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
  1. nose-of-yeti

    Provides an RSpec inspired dsl for python tests. Inspired by the yeti project found at http://github.com/fmeyer/yeti

    A long time ago I stumbled upon (and contributed to) https://github.com/delfick/nose-of-yeti. The most delightful bit of cursed Python I’ve seen!

  2. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
  3. blursed

    Just because you can doesn't mean you should.

    I did something similar to option 3 to make the default numeric "callable", since the dunder __call__ methods can't be overwritten for integer types. For example, in regular arithmetic notation, something like 6(7+8) could be read as 6*(7+8), but trying to do this in Python gives you `SyntaxWarning: 'int' object is not callable;`, since you're essentially trying to do a function call on the literal 6. The workaround was to use a custom codec to wrap all integer literals to give them the expected call behavior.

    Repo if anyone is interested: https://github.com/ckw017/blursed

    This was inspired by a way less silly usecase, future f-strings, which added f-string support to older versions of Python in a similar way using codecs: https://github.com/asottile-archive/future-fstrings

  4. future-fstrings

    Discontinued A backport of fstrings to python<3.6

    I did something similar to option 3 to make the default numeric "callable", since the dunder __call__ methods can't be overwritten for integer types. For example, in regular arithmetic notation, something like 6(7+8) could be read as 6*(7+8), but trying to do this in Python gives you `SyntaxWarning: 'int' object is not callable;`, since you're essentially trying to do a function call on the literal 6. The workaround was to use a custom codec to wrap all integer literals to give them the expected call behavior.

    Repo if anyone is interested: https://github.com/ckw017/blursed

    This was inspired by a way less silly usecase, future f-strings, which added f-string support to older versions of Python in a similar way using codecs: https://github.com/asottile-archive/future-fstrings

  5. lambdex

    Write complicated anonymous functions beyond lambdas in Python.

    I've attempted something more crazy -- to make Python support multi-line lambda expression [1].

    It's done with AST manipulation as well, but on a larger scale and completer functionalities.

    [1] https://github.com/hsfzxjy/lambdex

  6. pyxl

    A Python extension for writing structured and reusable inline HTML.

  7. pyxl4

    Extend Python syntax with HTML.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: Best codebases to study to learn software design?

    3 projects | news.ycombinator.com | 23 Aug 2025
  • Complete Beginner's Guide to GenAI Development: From Python to Production-Ready AI Agents

    1 project | dev.to | 20 Jul 2025
  • Setting Up Your First MCP Server with Python (Part 3/5)

    1 project | dev.to | 27 Jun 2025
  • XediX alternatives - qtedit4 and Yamuna

    3 projects | 17 Jun 2025
  • When random people give money to random other people

    1 project | news.ycombinator.com | 13 Jun 2025

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