• Re: Python

    From Nightfox@VERT/DIGDIST to Kirkman on Fri Dec 14 17:30:46 2018
    Re: Re: Python
    By: Kirkman to Nightfox on Tue Dec 11 2018 09:26 pm

    This is something I love about Python, personally.

    Make sure you don't mix spaces and tabs for indentation in your code, or Python will likely complain.

    I like that it helps keep code consistent, but one downside that bugs me is that text editors often assume you want to continue your indented code block in Python, and Python doesn't use curly braces, which text editors often use with other languages to know when you're done with a code block. In other languages, text editors can even know you're done with a one-line block of code without curly braces since that's how other programming languages work.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Mortifis@VERT/EMPTYKEG to Nightfox on Sat Dec 15 11:44:34 2018
    Re: Re: Python
    By: Kirkman to Nightfox on Tue Dec 11 2018 09:26 pm

    This is something I love about Python, personally.

    Make sure you don't mix spaces and tabs for indentation in your code, or Python will likely complain.

    I like that it helps keep code consistent, but one downside that bugs me is that text editors often assume you want to continue your indented code block in Python, and Python doesn't use curly braces, which text editors often use with other languages to know when you're done with a code block. In other languages, text editors can even know you're done with a one-line block of code without curly braces since that's how other programming languages work.

    I keep running into unexpected indent or unexpected unindent when using nested loops and such, which is obviously my lack of understanding of Python. Another problem I keep running into is, for example, x = x + 1 or x += 1 ... syntax error. I won't paste my troubled code but Python is definitely a finicky language

    ---
    þ Synchronet þ The Empty Keg BBS emptykeg.synchro.net:82 Lake Echo NS Canada
  • From Fireball@VERT/FBEX to Mortifis on Mon Jan 28 23:40:12 2019
    I keep running into unexpected indent or unexpected unindent when using nested loops and such, which is obviously my lack of understanding of Python. Another problem I keep running into is, for example, x = x + 1 or x += 1 ... syntax error. I won't paste my troubled code but Python is definitely a finicky language

    I don't know what you're using for an editor, but it's not working for you. NotePad++, Visual Studio Code, PyCharm, and Sublime Text will all help with syntax, formatting, and beautification. You will most likely need to install plugins to make them work with python code, but a good editor always helps.

    Fireball

    ---
    þ Synchronet þ My Brand-New BBS