<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi" -->

---
title: mathialo/bython: Python with braces. Because python is...
description: Bython is a Python preprocessor that allows the use of curly braces instead of indentation for code blocks, making code more robust against errors caused by...
canonical: https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: mathialo/bython: Python with braces. Because python is awesome, but whitespace is awful. | daily.dev
og:description: Bython is a Python preprocessor that allows the use of curly braces instead of indentation for code blocks, making code more robust against errors caused by...
og:url: https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi
og:image: https://api.daily.dev/og/posts/lWSeQu2oi.png
og:image:alt: mathialo/bython: Python with braces. Because python is awesome, but whitespace is awful.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mathialo/bython: Python with braces. Because python is awesome, but whitespace is awful.

**[Hacker News](https://daily.dev/sources/hn)** · 3 min read · 32 upvotes · 8 comments

## Summary

Bython is a Python preprocessor that allows the use of curly braces instead of indentation for code blocks, making code more robust against errors caused by inconsistent indentation. It supports existing Python modules and can be installed via PyPI or by cloning the git repository. Bython translates Bython (.by) files into Python files and includes a tool to convert Python files to Bython files.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/mathialo/bython>

## Community discussion

Top comments from developers on daily.dev.

**@amizzo** · 8 upvotes

> what is this garbage...python is awesome, and whitespace (and what it enforces, etc) is one of the reasons why.
>
> also it's six years since last commit..?

**@guionardo** · 6 upvotes

> "inconsistent indentation"... That's developer fault. Fix it. Don't create a "new python syntax" just to hug a bad developer.

**@ghost** · 6 upvotes

> the responses from the "anti-bracket millitia" is mildly entertaining... lol. people get seriously worked up over this.
>
> FWIW, as a long time JS developer currently trying to learn Python, the one thing I battle the most with is the lack of braces. yes we get syntax errors, but they are far more difficult to spot when there is no clearly defined "start" and "end" for blocks of code.
>
> with that said, I do have to agree that creating a preprocessor for a non-standard Python syntax is definitely not the solution.

**@atx** · 2 upvotes

> This is a high act of vandlism !

**@jwezel** · 1 upvotes

> This is satire, right?
>
> If not:
>
> This must be the stupidest idea since the invention of communism.
>
> Wow, so upside down.
>
> 🤡

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#open-source](https://daily.dev/tags/open-source), [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"mathialo/bython: Python with braces. Because python is awesome, but whitespace is awful.","url":"https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi"},"datePublished":"2024-07-07T22:44:40.743Z","dateModified":"2026-03-15T03:48:48.478Z","description":"Bython is a Python preprocessor that allows the use of curly braces instead of indentation for code blocks, making code more robust against errors caused by...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fe06b2702eb27d5f8f80c07d0830ecb9?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fe06b2702eb27d5f8f80c07d0830ecb9?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":8,"discussionUrl":"https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":32},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":8}],"keywords":"devtools,open-source,python","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"mathialo/bython: Python with braces. Because python is awesome, but whitespace is awful."}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/mathialo-bython-python-with-braces-because-python-is-awesome-but-whitespace-is-awful--lwsequ2oi","comment":[{"@type":"Comment","text":"what is this garbage…python is awesome, and whitespace (and what it enforces, etc) is one of the reasons why.\nalso it’s six years since last commit…?","datePublished":"2024-07-08T23:55:56.028Z","dateModified":"2024-07-09T00:09:43.832Z","url":"https://daily.dev/posts/lWSeQu2oi#c-CIDKnlaCB","author":{"@type":"Person","name":"Anthony Izzo","url":"https://daily.dev/amizzo","image":"https://lh3.googleusercontent.com/a/ACg8ocI3KpxrCJphZmqCBYWzrlZz0yUJS3pQF3RYarylAe8SP_G6_KUCoQ=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8}},{"@type":"Comment","text":"“inconsistent indentation”… That’s developer fault. Fix it. Don’t create a “new python syntax” just to hug a bad developer.","datePublished":"2024-07-10T11:57:39.286Z","url":"https://daily.dev/posts/lWSeQu2oi#c-jQRxCHuRw","author":{"@type":"Person","name":"Guionardo Furlan","url":"https://daily.dev/guionardo","image":"https://avatars.githubusercontent.com/u/1966484?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"the responses from the “anti-bracket millitia” is mildly entertaining… lol. people get seriously worked up over this.\nFWIW, as a long time JS developer currently trying to learn Python, the one thing I battle the most with is the lack of braces. yes we get syntax errors, but they are far more difficult to spot when there is no clearly defined “start” and “end” for blocks of code.\nwith that said, I do have to agree that creating a preprocessor for a non-standard Python syntax is definitely not the solution.","datePublished":"2024-07-13T09:46:18.135Z","url":"https://daily.dev/posts/lWSeQu2oi#c-Iq86VT2KZ","author":{"@type":"Person","name":"Deleted user","url":"https://daily.dev/ghost","image":"https://media.daily.dev/image/upload/s--hNIUzLiO--/f_auto/v1705327420/public/ghost_vlftth"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"This is a high act of vandlism !","datePublished":"2024-07-11T21:31:56.168Z","url":"https://daily.dev/posts/lWSeQu2oi#c-j91a4U21w","author":{"@type":"Person","name":"ATX","url":"https://daily.dev/atx","image":"https://lh3.googleusercontent.com/a/ACg8ocIYvtI8cMuIcNpr8l6lYsgJVTkY3bsPWXoYGfz1rZPcyL4lo5qf=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"This is satire, right?\nIf not:\nThis must be the stupidest idea since the invention of communism.\nWow, so upside down.\n🤡","datePublished":"2024-07-31T18:39:38.667Z","url":"https://daily.dev/posts/lWSeQu2oi#c-eFLVevfV7","author":{"@type":"Person","name":"Johnny Wezel","url":"https://daily.dev/jwezel","image":"https://avatars.githubusercontent.com/u/2018220?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

