POV-Ray : Newsgroups : povray.unix : Pyvon 1.3 : Re: Pyvon 1.3 Server Time
6 Oct 2024 13:44:06 EDT (-0400)
  Re: Pyvon 1.3  
From: fabien Henon
Date: 28 Jan 2003 17:47:58
Message: <3e37089e@news.povray.org>
Warp wrote:

> 
>>'Beautify' the code : Replaced spaces with tabs inside the code
>>Much remains to be done
> 
> 
>   I don't understand how this "beautifies" the code. If anything, it only
> causes problems.
> 
Indeed you did not understand. I meant I began to beautify the *PYTHON* 
code of pyvon. I never wrote that pyvon beautifies pov-ray code.
I should have written : 'Beautified' the pyvon code.

Apart from
- syntax highlighting
- automatic keyword expansion
- highlights of matching braces
- customization of tab lengths (all of which are already supported in pyvon)
I do not see what else I could add to make POV-Ray script more readable.

What I meant by replacing spaces with tabs is that python language is 
structured around indentation. Python does not use parentheses, 
brackets, semi-colon or keywords to delimit(nest) declaration or tests ie :


if x > y :      # test                            (indentation 0)
       print x   # what to do if the test is true (indentation 1)
       if x > 0: # nested test                    (indentation 1)
            x=x+1# things to do if test is true   (indentation 2)
else:           #                                 (indentation 0)
       print y   # what to do if the test is not true (indentation 1)
d="gfdgds"      # we are out of the test here     (indentation 0)



Both spaces and tabs are accepted in a python script; and when I began 
writing pyvon, I used different editors and did not want to bother to 
set up the different tab lengths and went for spaces instead. (Lazy me !)


Fabien HENON


Post a reply to this message

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