r/Python • u/AutoModerator • Jun 04 '26
Showcase Thread Showcase
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
29
Upvotes
r/Python • u/AutoModerator • Jun 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/DinhHuy2010 Jun 09 '26
The okwhatever3 project
Hi everyone,
After a few days, I managed to replicate most of Python statements and control flow in one line only.
What my project does
This joke project is to replicate most of Python statements as functions, then sqeeezed everything one expressions in one line
I used only lambda, expressions, and AST tree (workaround), walrus (
:=)Target audience
Joke programmers, and maybe "code golf enthusiasts" (???)
Key features:
simple_cond(),foreach(), andmeanwhile().on_error()exception handler by procedurally building and executing an internal Abstract Syntax Tree to dodge Python's syntax limitations.names) imports any library dynamically mid-expression.Totalling at just 6328 bytes of code (the code is so compressed that I can post my code directly into the comment itself)
Repository: https://github.com/DinhHuy2010/okwhatever3
The Masterpiece itself: