115

Why does the Python developer have crooked teeth?

Because he doesn't use braces

Comments
  • 3
    Some good drunken dev humor! 😄
  • 4
    @DGApps Similar for other languages though, a single wrong brace can mess things up as well.
  • 0
    @DGApps how is that? Indentation/white spaces?
  • 1
    @vicci Python is indentation sensitive...i.e. everything after an if has to be indented by 4 spaces to make it work...it's awesome though and I would take it over braces and semicolons all day
  • 1
    @SHA-256 it can be any amount but Bible (read PEP) dictates 4 of them
  • 1
    @bittersweet yeah sure, but a brace is a visible character, a space is an invisible character, and when you are combine spaces with tabs it gets annoying.

    Also creating a parser for python is just annoying because whitespace is used for something else than formatting
  • 0
    @DGApps that's why it should be TABs. I seriously don't know what drugs did the people who wrote PEP consume.
  • 0
    @apisarenco Okay, can anybody please tell me why this whole "tabs vs spaces" discussion is a thing in our profession? Every decent IDE has a formatter, keep a coding convention profile, a personal profile and just format once when you get it and once before you commit, it's not rocket science. If the indentation was okay with tabs it should be okay with spaces afterwards.
  • 1
    @Godisalie because I want to use tabs. Because I want thin indentation of just 2 spaces because I tile my editor vertically and need the space. Because if you do it with spaces, you need to modify the entire code to achieve that, and everybody has to accept your change. With tabs, nobody gives a shit because it's an individual preference.
  • 0
    @apisarenco So why not use a formatter? I have some preferences too that aren't conforming with code conventions, so I fetch, change the formatter to my personal profile, ctrl+a, ctrl+shift+f, write my stuff, change the formatter profile to one conforming to convention, format and commit. It's maybe 30 seconds of extra work.
  • 0
    @Godisalie what if someone uses a different formatter or formatter options? It will automatically make changes to the entire file.
    Also, changing options and reformatting each file before you start editing it, and then again before a commit, is just a horrible idea.
  • 4
    Well, good morning. Didn't mean to stirr up a tabs/spaces war here haha.
  • 1
    Never needed to use braces, my dentist says I have perfect teeth placement so idk man

    Also

    from __future__ import braces
  • 1
  • 0
    Use TAB configured to input 4 spaces
  • 1
    @DirtyBit Lucky you ;)
  • 1
    @marthulu yeah great for su- wait no
  • 1
    @DirtyBit Wait what ;o
  • 2
    @marthulu uuh nothing >.>
  • 0
    Everything should be already aligned perfectly. Why needs braces then?
  • 1
    @krazycavin Well then you don't lol
Add Comment