• Pennomi@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    2
    ·
    edit-2
    9 hours ago

    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.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      6
      ·
      5 hours ago

      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?

      • scott@lemmy.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 hours ago
        ~ $ 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
        >