[pythonvis] Re: Indentation of code

  • From: "Joseph Lee" <joseph.lee22590@xxxxxxxxx>
  • To: <pythonvis@xxxxxxxxxxxxx>
  • Date: Thu, 8 May 2014 15:20:08 -0700

Hi,

Another suggestion (mostly for people used to tabs) might be:

Level0:

Write some code.

Some condition/function:

Level1:

               Do something.

Level1End

This is for presentational purposes in emails. In real code, don’t write 
levelN/levelNend though.

I’ll address this again in our meeting today.

Cheers,

joseph

 

From: pythonvis-bounce@xxxxxxxxxxxxx [mailto:pythonvis-bounce@xxxxxxxxxxxxx] On 
Behalf Of Sharon Hooley
Sent: Thursday, May 8, 2014 11:51 AM
To: pythonvis@xxxxxxxxxxxxx
Subject: [pythonvis] Re: Indentation of code

 

Maybe you could type, indent 2, indent 4, ectcetera, then type the colon before 
skipping the line?

 


Sent from my iPhone


On May 7, 2014, at 8:41 PM, Richard Dinger <rrdinger@xxxxxxxxxx> wrote:

A close relative to Sharon’s code format issue is how many spaces to use in 
code examples.  This may be controversial.

 

Although four spaces is the most common indentation, I suggest two spaces per 
indentation level will work better especially for email.  Two and four spaces 
are both common standards, but four spaces eats too much page territory.

 

Richard

Other related posts: