Norbi's Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
devilish666@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago

It's always semicolon, God damnit.......

lemmy.world

message-square
22
link
fedilink
8

It's always semicolon, God damnit.......

lemmy.world

devilish666@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago
message-square
22
link
fedilink
alert-triangle
You must log in or register to comment.
  • Destide@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    import " " as ;

    • 𝘋𝘪𝘳𝘬@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I;don’t;think;that;helps

  • Carighan Maconar@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    For bonus points take their code and completely go wild with utterly random indentation and line breaks, just to drive the point home. 😈

    • trolololol@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Pfff just randomly replace tabs with 4 spaces and see the world burn

      • 🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        4 spaces is the preferred pythons is happy with either but the standard is 4 spaces. Vscodium ensures that.

        • trolololol@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Your editor is happy with either, but is it happy with both?

          • 🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖@lemm.ee
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            My editor will take either and convert it to 4 spaces. Python can use spaces or tabs but not both in the same file.

            • trolololol@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Buahahahah I know what to do next commit

              • 🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖@lemm.ee
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                Its the python equivalent of a Greek question mark

                • trolololol@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  Plot twist https://programming.dev/post/12825985

  • shastaxc@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    This is why linting and auto-format on save exists in IDEs. Don’t make things harder on yourself.

  • LazaroFilm@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I have a plugin in VSCode to remind me not to forget the semicolons

  • toastal@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Folks acting like Python is the only language without semicolons. 😏

    I got tripped up so many time in the last 3 weeks using PHP after years in ML family languages. I am already newlining & it’d be poor style to put more than one statement on a line so what is the point of these semicolons?

    • pixelscript@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      it’d be poor style to put more than one statement on a line

      Unlike Python, most languages do not endorse a specific concept of style. You’re free to dabble in all the bad style choices you like, on the off chance that once in a blue moon they prove to be situationally useful.

  • arudesalad@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I was taught python by my school but I would rather write in other languages but the difference in formatting still gets me after years

  • Daxtron2@startrek.website
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    can I interest you in some delicious linters

  • PhobosAnomaly@feddit.uk
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I was brought up on C, did a module of Java at uni, and am doing an algorithms course which is python heavy.

    My other half - who’s quite handy with Python - looks in sheer horror at my code which is littered with semicolons.

    I was stumped for half an hour figuring out why the Python interpreter was bouncing an error before it had even reached the main program logic… turns out a { before the block of code royally ruins the interpreter’s day.

    Still, I live and learn.

  • cybervseas@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    How does one manually add a semicolon? vs. automatically?

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Manually would be if it prompted you every time you every time the program inserts one. No, wait…

    • atyaz@reddthat.com
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      JS formatters add them if the project requires it

  • lowleveldata@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    PythonAmateur programmers

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 301 users / day
  • 1.11K users / week
  • 3.29K users / month
  • 9.89K users / 6 months
  • 1 local subscriber
  • 36.9K subscribers
  • 1.25K Posts
  • 16K Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org