Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Python problems...

Python problems...

Scheduled Pinned Locked Moved The Lounge
python
73 Posts 29 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO OriginalGriff

    Most editors can, but they tend to default to "use tabs" to save file space. And some only do it for modified lines, and ... it's a mess. Just don't use Python is my advice! :laugh:

    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

    W Offline
    W Offline
    WPerkins
    wrote on last edited by
    #64

    Just add braces. For the "purists" make them optional. I have set a new project NPP policy: No Python Period. Cannot find a compelling reason to introduce chaos just to be trendy.

    1 Reply Last reply
    0
    • H honey the codewitch

      I refer to it as "invisible source code" because that's what significant whitespace is. And it's just as stupid as it sounds. How do you debug that which you cannot see? It's risible.

      To err is human. Fortune favors the monsters.

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #65

      honey the codewitch wrote:

      How do you debug that which you cannot see?

      Casting a spell to make it visible? Using talcum powder? Asking a blind colleague to do it for you?

      M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

      1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        Worse: space and tab are not the same: so two lines which look to be identically indented in your chosen editor can be in different code blocks as a tab is one whitespace regardless of the visual effect. X|

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

        A Offline
        A Offline
        Al Fargnoli
        wrote on last edited by
        #66

        Get a better editor!

        1 Reply Last reply
        0
        • K Kenneth Haugland

          It is scripted so it's slower than .NET code. And the UI? :~

          A Offline
          A Offline
          Al Fargnoli
          wrote on last edited by
          #67

          But it gives the correct answers when you have complex variables. Dot-net can't do that.

          1 Reply Last reply
          0
          • M Mircea Neacsu

            I didn’t say the text of a program is the same as the text of a novel. What I do say however is that people writing programs could use a bit from the centuries of experience of typographers. It might be one of my (many) obsessions, but being somewhat dyslexic, I pay a lot of attention to things like font typeface, tab sizes page layout and such. When things go well, my programs are a thing of beauty in content and form. That happens rarely 🤪

            Mircea

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #68

            Mircea Neacsu wrote:

            I didn’t say the text of a program is the same as the text of a novel

            The thread is about programming but you then said the following "in books that use it, is proportional to font size" The way I read that post suggested that there is an equivalence. As I read it. I saw nothing in the post to which you responded which would have suggested they were referring to English.

            1 Reply Last reply
            0
            • G glennPattonWork3

              Hi All, Being strongly encouraged (read forced) to use Python for a test rig. Okay need to get down with Kids etc. but syntactic white space 'align your tabs' (who came up with that, is it 1988, am I using a BBC micro) oh gord!!!:mad:

              J Offline
              J Offline
              Jeremy Falcon
              wrote on last edited by
              #69

              As an added bonus... it's also slow.

              Jeremy Falcon

              G 1 Reply Last reply
              0
              • J Jeremy Falcon

                As an added bonus... it's also slow.

                Jeremy Falcon

                G Offline
                G Offline
                glennPattonWork3
                wrote on last edited by
                #70

                'But thats not an issue with modern PCs' try running it a PC104 that a few years old...

                J 1 Reply Last reply
                0
                • G glennPattonWork3

                  'But thats not an issue with modern PCs' try running it a PC104 that a few years old...

                  J Offline
                  J Offline
                  Jeremy Falcon
                  wrote on last edited by
                  #71

                  It depends on the application. If everybody thought that way, even modern PCs would run slower than they need to... which they do. There's seldom a good reason to make an use a slow language unless A: there's no other option and B: it introduces some radically new concept. People are just lazy and would rather not learn how to do things the best way, so we get crap like this.

                  Jeremy Falcon

                  1 Reply Last reply
                  0
                  • P peterkmx

                    Oh no ... 😊 this is not my cup of tea, I’ve seen one or 2 fragments on YT a few years ago, and I found it ridiculous, beyond strange, not really interesting ... Thus risible fits here also I guess, but why “wisible”? 😊 My intuition says that this is the pronunciation from the movie - is this guess correct?

                    A Offline
                    A Offline
                    Alister Morton
                    wrote on last edited by
                    #72

                    Correct, the Emperor has a speech defect, which the centurion finds greatly amusing.

                    1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      Most editors can, but they tend to default to "use tabs" to save file space. And some only do it for modified lines, and ... it's a mess. Just don't use Python is my advice! :laugh:

                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                      M Offline
                      M Offline
                      Matt T Heffron
                      wrote on last edited by
                      #73

                      Any programming language that depends on formatting is fundamentally flawed by design!

                      "Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed." - G.K. Chesterton

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups