pythOwO
A Python in UwU speak that turned out to be BASIC.
virejdasani, 2022 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
virejdasani made pythOwO in 2022, after a post on r/ProgrammerHumor. It is meant to be Python with UwU spelling. print is pwint, return is WETURN and a variable is made with pwease. The specification notes that it reads more like BASIC than Python. Keywords are in capitals and blocks close with END, not by indentation.
Read the story
Most things are expressions. IF gives a value, so it stands in for a ternary, and a loop on one line gives the list of its body's values.
The machine
| Code | Does |
|---|---|
pwease x = 5 / x = 6 | Define a variable / set it |
IF c THWEN ... EWIF c THWEN ... EWSE ... END | Choose |
WHILE c THWEN ... END | Loop while c holds |
FOR i = 0 TO 10 STWEP 2 THWEN ... END | Count, 10 left out |
FWUNCTION f(a, b) ... END | A function; -> expr for one expression |
WETURN BWEAK CONTINUWU | Return, break, continue |
pwint(x) inpwt() inpwt_int() | Print a line, read a line, read an integer |
appwend pwp extwend lwen | Work on lists |
twue fawse nwull mwath_pwi | 1, 0, 0 and pi |
Numbers print as Python prints them. / always gives a float, so 10 / 4 * 4 prints 10.0. The specification gives no spelling for AND, OR and NOT, so they keep their English names, and rwun, which runs a file, is left out.
Example
IF is an expression, so it can pick a string.
IF is an expression, so it can pick a string.
The Fibonacci is a one expression function whose body starts on the next line. It starts from 1 and 1, so fibonacci(10) is 89.
A loop on one line is a list.
Further
See also
Also in Jokes
Write your own in Run Convert a program from pythOwO
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: pythowo.
Command line
shib run pythowo -e 'pwint("Hewwo Wowrld!")'shib manual pythowoSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/pythowo.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org