POV-Ray : Newsgroups : povray.pov4.discussion.general : Curly braces replaced by indentations but only as an option ? : Re: Curly braces replaced by indentations but only as an option ? Server Time
1 Apr 2025 16:36:55 EDT (-0400)
  Re: Curly braces replaced by indentations but only as an option ?  
From: ingo
Date: 20 Mar 2025 03:00:00
Message: <web.67dbbbff7e3c5a9917bac71e8ffb8ce3@news.povray.org>
"Mr" <m******r******at_hotmail_dot_fr> wrote:

> In python you can only have tab sized (4 spaces) indents like this[...]

in addition to Tor Olav's evil tabs, a tab is just a '\t' symbol like a '\n' or
'\r'. You can tell your editor to use any tab size >0 you like. Python just
looks at the '\t' not at what your editor thinks how wide a tab is.

But that's not all, Python also looks at spaces for indentation. The mixing of
tabs and spaces is what makes things messy. Something that easily happens when
copying code. So set your editor to always convert tabs to spaces, the length is
up to your preference.

ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.