The meaning of this
The meaning of this
The meaning of this
You're viewing a single thread.
In Python you can use this as a variable name
In Python you can use 🍆 as a variable name.
Edit: oops, guess I was mistaken, you can use most Unicode but emojis are not valid.
Just going by the reputation, you probably can do this in JavaScript
~ $ python Python 3.12.10 (main, Apr 9 2025, 18:13:11) [Clang 18.0.3 (https://android.googlesource.com/toolchain/llvm-project d8003a456 on linux Type "help", "copyright", "credits" or "license" for more information. >>> ❗ = 'nah' File "<stdin>", line 1 ❗ = 'nah' ^ SyntaxError: invalid character '❗' (U+2757) >>> ~ $ node Welcome to Node.js v23.11.1. Type ".help" for more information. > const 👍 = 'test' const 👍 = 'test' ^ Uncaught SyntaxError: Invalid or unexpected token >
Edit: oops, guess I was mistaken, you can use most Unicode but emojis are not valid.
That actually seems even more arbitrary. Like, do they just hate fun?
C supremacy
The source character set is implementation defined.
you might be thinking of Rust.
You can use anything that doesn't start with a digit or punctuation as a variable name (underscore beginning also allowed) unless it's a keyword.
_ (sic) as a variable name is often used when a function returns multiple outputs but you only want one
def my_function: return 1, 2, 3 _, two, _ = my_function()
Underscore alone is a special variable name and I'm pretty sure anything assigned to it goes straight to garbage collection. Whereas _myvariable
is typically use to indicate a "private" class variable or method (Python doesn't have private so it's just a convention).