frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Python f-string cheat sheets (2022)

https://fstring.help/cheat/
67•shlomo_z•5h ago

Comments

xavdid•3h ago
Ah, these are great! f-strings are so powerful, but I can never remember the arcane little syntax. Definitely bookmarking this.
nickcw•1h ago
From the f-strings PEP 498

https://peps.python.org/pep-0498/

> This PEP is driven by the desire to have a simpler way to format strings in Python.

I think f-strings have become the thing they were trying to replace and they are now more complicated than the old % interpolation.

I still like f-strings and use them a lot but if you look at the cheat sheet, they are no longer simple.

ayhanfuat•1h ago
> if you look at the cheat sheet, they are no longer simple.

Most of the formatting options in the cheat sheet have always been available with f-strings. They are part of the Format Specification Mini Language (https://docs.python.org/3/library/string.html#format-specifi...) and both string.format and f-strings use the same spec. f-strings have some additional capabilities like inline expressions and debugging/logging with `=`.

asicsp•1h ago
See also this quiz: https://fstrings.wtf/
roenxi•51m ago
This looks like a cheatsheet for writing a hard-to-read Python script. I don't know who gets karmic brownie points for a f"{string:>20}" field, but under most normal cases it'd be better to use rjust() directly and not force people to remember Yet Another DSL.

Once a reader could be reasonably expected to consult reference material while working out what a print() is doing something has gone wrong. This is the programmer equivalent of wearing too much makeup.

D4d4

https://www.nmichaels.org/musings/d4d4/d4d4/
144•csense•3d ago•14 comments

Show HN: I replaced vector databases with Git for AI memory (PoC)

https://github.com/Growth-Kinetics/DiffMem
88•alexmrv•3h ago•29 comments

Code review can be better

https://tigerbeetle.com/blog/2025-08-04-code-review-can-be-better/
279•sealeck•11h ago•152 comments

Show HN: I was curious about spherical helix, ended up making this visualization

https://visualrambling.space/moving-objects-in-3d/
772•damarberlari•20h ago•127 comments

To Infinity but Not Beyond

https://meyerweb.com/eric/thoughts/2025/08/20/to-infinity-but-not-beyond/
4•roosgit•44m ago•0 comments

Epson MX-80 Fonts

https://mw.rat.bz/MX-80/
94•m_walden•3d ago•29 comments

Data, objects, and how we're railroaded into poor design (2018)

https://www.tedinski.com/2018/01/23/data-objects-and-being-railroaded-into-misdesign.html
54•dvrp•5h ago•14 comments

Why are anime catgirls blocking my access to the Linux kernel?

https://lock.cmpxchg8b.com/anubis.html
573•taviso•19h ago•575 comments

Australia Post halts transit shipping to US as 'chaotic' tariff deadline looms

https://www.abc.net.au/news/2025-08-21/australia-post-suspends-transit-shipping-parcels-us-trump-tariff/105680456
72•breve•2h ago•50 comments

Python f-string cheat sheets (2022)

https://fstring.help/cheat/
67•shlomo_z•5h ago•5 comments

SK hynix dethrones Samsung as world’s top DRAM maker

https://koreajoongangdaily.joins.com/news/2025-08-15/business/tech/Thanks-Nvidia-SK-hynix-dethrones-Samsung-as-worlds-top-DRAM-maker-for-first-time-in-over-30-years/2376834
137•ksec•3d ago•56 comments

A statistical analysis of Rotten Tomatoes

https://www.statsignificant.com/p/is-rotten-tomatoes-still-reliable
143•m463•10h ago•66 comments

Gemma 3 270M re-implemented in pure PyTorch for local tinkering

https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/12_gemma3
383•ModelForge•20h ago•55 comments

Home Depot sued for 'secretly' using facial recognition at self-checkouts

https://petapixel.com/2025/08/20/home-depot-sued-for-secretly-using-facial-recognition-technology-on-self-checkout-cameras/
148•mikece•18h ago•157 comments

Mirror Ball Emoji Proposal (2018) [pdf]

https://www.unicode.org/L2/L2019/19310-mirror-ball-emoji.pdf
35•michalc•3d ago•20 comments

Launch HN: Channel3 (YC S25) – A database of every product on the internet

121•glawrence13•18h ago•77 comments

Basic dependency injection in OCaml with objects

https://gr-im.github.io/a/dependency-injection.html
5•nukifw•2d ago•1 comments

The Pleasure of Patterns in Art

https://thereader.mitpress.mit.edu/why-repetition-in-art-pleases-the-brain/
35•prismatic•6h ago•5 comments

French firm Gouach is pitching an Infinite Battery with replaceable cells

https://arstechnica.com/gadgets/2025/05/gouach-wants-you-to-insert-and-pluck-the-cells-from-its-infinite-e-bike-battery/
132•pabs3•3d ago•93 comments

Sequoia backs Zed

https://zed.dev/blog/sequoia-backs-zed
401•vquemener•22h ago•262 comments

SimpleIDE

https://github.com/jamesplotts/simpleide
76•impendingchange•10h ago•32 comments

Show HN: Luminal – Open-source, search-based GPU compiler

https://github.com/luminal-ai/luminal
115•jafioti•18h ago•53 comments

Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

https://github.com/plutoprint/plutoprint
123•sammycage•13h ago•29 comments

Project to formalise a proof of Fermat’s Last Theorem in the Lean theorem prover

https://imperialcollegelondon.github.io/FLT/
115•ljlolel•15h ago•82 comments

Introduction to AT Protocol

https://mackuba.eu/2025/08/20/introduction-to-atproto/
165•psionides•15h ago•86 comments

Dev Reveals Secrets Behind New "3D" Platformer for the ZX Spectrum

https://www.timeextension.com/news/2025/08/dev-reveals-secrets-behind-stunning-new-3d-platformer-for-the-zx-spectrum
12•Flow•1h ago•0 comments

Coris (YC S22) Is Hiring

https://www.ycombinator.com/companies/coris/jobs/rqO40yy-ai-engineer
1•smaddali•13h ago

An Update on Pytype

https://github.com/google/pytype
180•mxmlnkn•17h ago•60 comments

Zedless: Zed fork focused on privacy and being local-first

https://github.com/zedless-editor/zed
496•homebrewer•15h ago•271 comments

Tidewave Web: in-browser coding agent for Rails and Phoenix

https://tidewave.ai/blog/tidewave-web-phoenix-rails
286•kieloo•1d ago•55 comments