> Anyway, I am concerned why things like indentation errors happen. For the 
> benefit
> of others reading who are less familiar with python, python is strange in that
> indentations are used to indicate control blocks - i.e. what {} does in 
> C/perl/java.
> So indentation errors in python is somewhat equivalent to not having
> matching braces in other languages. Having more than one of those, at 
> different
> and far-way places, indicates that codes are being written (and committed)
> which has never been run or even checked for basic syntax correctness. This 
> is worrying.
>
> So I suggest:
>
> - runs "python -m " on the file you are editing from time to time - this 
> checks for
> syntax correctness among other things, without actually running the code. (for
> codes that can't run on its own). That's another reason to use the
> "if __name__ == '__main__':" trick for python modules to unit test, to make 
> sure
> that each file in a module can run on its own and do something simple.


Thank you for pointing that out, I just cleaned it up and now the
there are no errors in the repository.
I will start using python -m on files I am working on to check for such things.
_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to