Re: code indentation (python and c...)

  • From: james.homme@xxxxxxxxxxxx
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Thu, 3 Apr 2008 11:43:12 -0400

Two does not make Python complain. If you are going to let sighted people
read your code, you might want to change it to four right before that.


James D Homme, , Usability Engineering, Highmark Inc.,
james.homme@xxxxxxxxxxxx, 412-544-1810

"it is only possible to live happily ever after on a day-to-day basis." --
Margaret Bonnano

Highmark internal only: Consider Usability Engineering On Your Next Project
or release.

             "Daniel Dalton"                                               
   >                                                     To 
             Sent by:                  "blind programming"                 
             programmingblind-         <programmingblind@xxxxxxxxxxxxx>    
             bounce@freelists.                                          cc 
                                       code indentation (python and c...)  
             04/03/2008 08:26                                              
             Please respond to                                             


I'm learning python and know a bit of c.
Is the following code ok?
Like is it fine to use 2 spaces for indenting instead of four?
I prefer 2 personally since I read braille...
So is this just a personal choice?

BTW how do you guys code in python with out braille?
Its quite white-space dependent...

Anyway is this code ok re white space?


i = 2
if i == 2 :
   print "hello"
print "done."

Obviously it is useless and the if is pointless since 2 is hard coded to
But is the indentation fine?
Or is it a bad standard.
I know it works.

And is the following good c code re indentation?
Or should I be using 4 or 5 spaces?

int main (void)
   printf ("hello world\n");

So is my 2 space indenting ok? Or is this a personal choice thing?
Or is there a certain number of spaces I should follow?
I just set up my text editor (emacs) to do indenting for me and set it to
Should this be changed?


Daniel Dalton
View the list's information and change your settings at

View the list's information and change your settings at

Other related posts: