davidLin7692 / pymodbus

Automatically exported from code.google.com/p/pymodbus
0 stars 0 forks source link

Spaces or tabs #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert a comment # from the beginning of the line
2. press tab on next line
3. Did it insert 4 whitespaces or a tab?

What is the expected output? What do you see instead?
I see four whitespaces. This messes up the code so it won't run. 

What version of the product are you using? On what operating system?
version 8. Eclipse with pydev + pydev extensions (under windows)

Please provide any additional information below.

The Python styleguide recommends 4 white spaces to be used instead of tabs
for new projects, see below. 

http://www.python.org/dev/peps/pep-0008/

  Indentation

    Use 4 spaces per indentation level.

    For really old code that you don't want to mess up, you can continue to
    use 8-space tabs.

  Tabs or Spaces?

    Never mix tabs and spaces.

    The most popular way of indenting Python is with spaces only.  The
    second-most popular way is with tabs only.  Code indented with a mixture
    of tabs and spaces should be converted to using spaces exclusively.  When
    invoking the Python command line interpreter with the -t option, it issues
    warnings about code that illegally mixes tabs and spaces.  When using -tt
    these warnings become errors.  These options are highly recommended!

    For new projects, spaces-only are strongly recommended over tabs.  Most
    editors have features that make this easy to do.

Original issue reported on code.google.com by anders.h...@gtempaccount.com on 18 Feb 2009 at 12:12

GoogleCodeExporter commented 9 years ago
I agree that one should use spaces or tabs exclusively, however I disagree with 
using spaces over tabs.  Modern editors make it very easy to change tab size to 
reflect your own personal indentation taste.

Long story short, I use tabs but if you feel like changing the entire source 
base to 
spaces, you are more than welcome.

Original comment by Bashw...@gmail.com on 24 Feb 2009 at 10:28

GoogleCodeExporter commented 9 years ago
Fixed in revision 10 Changed all tabs in code to 4 whitespaces. 

http://code.google.com/p/pymodbus/source/detail?r=10

Original comment by anders.h...@gtempaccount.com on 25 Feb 2009 at 2:50