please read

Everyone please use the [leftbr]code[rightbr] and [leftbr]/code[rightbr] stylecodes around code sections. It's especially important with Python since indentation has special meaning. Thank you.


[size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

Comments

  • : Everyone please use the [leftbr]code[rightbr] and [leftbr]/code[rightbr] stylecodes around code sections. It's especially important with Python since indentation has special meaning. Thank you.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :

  • : : Everyone please use the [leftbr]code[rightbr] and [leftbr]/code[rightbr] stylecodes around code sections. It's especially important with Python since indentation has special meaning. Thank you.
    : :
    : :
    : : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    : :
    :
    :
    Sorry, forgot to type anything last time !!

    Could you give us an example, including a couple of indented blocks, or point me to an existing (on this board) good example.

    Thanks
    Nev
  • [b][red]This message was edited by Moderator at 2003-8-27 7:34:57[/red][/b][hr]
    : : : Everyone please use the [leftbr]code[rightbr] and [leftbr]/code[rightbr] stylecodes around code sections. It's especially important with Python since indentation has special meaning. Thank you.
    : : :
    : : :
    : : : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    : : :
    : :
    : :
    : Sorry, forgot to type anything last time !!
    :
    : Could you give us an example, including a couple of indented blocks, or point me to an existing (on this board) good example.

    Sure. When HTML is rendered by a web browser, whitespace is not preserved. Therefore, tabs and spaces get condensed unless you use special tags like
     to tell the browser to use a fixed-width font and maintain whitespace.  PH has the [leftbr]code[rightbr] and [leftbr]/code[rightbr] tags to do just this.  

    [code]
    if __name__ == '__main__':
    main()
    [/code]

    vs.

    if __name__ == '__main__':
    main()

    Both of these samples have four spaces before the call to main(), but only the first displays them.

    If you click on "Reply" to this message, you will be able to see the special tags I entered around the first example.



    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories