• Gloomy-Fix-4393@fediverser.communick.devB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    sounds like you haven’t learned most of what is being taught by the greats such as Uncle Bob and his clean code talks.

    print() in almost every case should probably be logger.log() if it is important.

    comments, doc strings aside, are usually (almost always?) a “code smell”.

    • binaryriot@fediverser.communick.devB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      “Clean code” is always about preference. I like code I can read and understand. If I want extra comments or keep some commented code to make a thought process about a coding decision more clear then that’s not a bad thing, IMHO.

      And if print() is such a bad thing, why wasn’t it deprecated for Python 3? Again this probably just comes down to preference again. I just print a final result of a program to stdout (which can be binary data, or some SVG, or just some lines of information). That has nothing to do with “logging”, IMHO.

      I don’t know who Uncle Bob is. 😳