Re: a couple of questions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: a couple of questions

Martin Landa
Hi,

2007/4/21, Michael Barton <[hidden email]>:

>  One thing that I notice is that when we both work on a file, we apparently
> have different ways of indenting. This produces errors if not consistent
> within a method or sometimes within a class. To get in sync, I was wondering
> how you do indents—spaces or tabs? If spaces, how many? Glynn Clements
> recommended tabs and a common indent distance of 4 spaces.

yes, it must be synchronized. Hm, I am using default python-mode in
Emacs 21.3.1. On my laptop Emacs 22.x.

Martin

>  Thanks
>  Michael
>  __________________________________________
>  Michael Barton, Professor of Anthropology
>  School of Human Evolution & Social Change
>  Center for Social Dynamics & Complexity
>  Arizona State University
>
>  phone: 480-965-6213
>  fax: 480-965-7671
>  www: http://www.public.asu.edu/~cmbarton
>
>


--
Martin Landa <[hidden email]> * http://gama.fsv.cvut.cz/~landa *

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: a couple of questions

Michael Barton



On 4/23/07 2:50 AM, "Martin Landa" <[hidden email]> wrote:

> Hi,
>
> 2007/4/21, Michael Barton <[hidden email]>:
>
>>  One thing that I notice is that when we both work on a file, we apparently
>> have different ways of indenting. This produces errors if not consistent
>> within a method or sometimes within a class. To get in sync, I was wondering
>> how you do indents‹spaces or tabs? If spaces, how many? Glynn Clements
>> recommended tabs and a common indent distance of 4 spaces.
>
> yes, it must be synchronized. Hm, I am using default python-mode in
> Emacs 21.3.1. On my laptop Emacs 22.x.

I'm using default python-mode tabs in Eclipse. It may be a thing of using
tabs or spaces. I can turn all my tabs to spaces. But a recent post from
Glynn suggested that tabs were preferable (for some reason I don't
remember).

Michael

>
> Martin
>
>>  Thanks
>>  Michael
>>  __________________________________________
>>  Michael Barton, Professor of Anthropology
>>  School of Human Evolution & Social Change
>>  Center for Social Dynamics & Complexity
>>  Arizona State University
>>
>>  phone: 480-965-6213
>>  fax: 480-965-7671
>>  www: http://www.public.asu.edu/~cmbarton
>>
>>
>

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: Re: a couple of questions

Michael Barton
In reply to this post by Martin Landa
This is settable in preferences. I can also use spaces I think if that is
better. Sorry if I misunderstood your earlier comment.

Michael


On 4/23/07 9:41 PM, "Glynn Clements" <[hidden email]> wrote:

>
> Michael Barton wrote:
>
>>>>  One thing that I notice is that when we both work on a file, we apparently
>>>> have different ways of indenting. This produces errors if not consistent
>>>> within a method or sometimes within a class. To get in sync, I was
>>>> wondering
>>>> how you do indents‹spaces or tabs? If spaces, how many? Glynn Clements
>>>> recommended tabs and a common indent distance of 4 spaces.
>>>
>>> yes, it must be synchronized. Hm, I am using default python-mode in
>>> Emacs 21.3.1. On my laptop Emacs 22.x.
>>
>> I'm using default python-mode tabs in Eclipse. It may be a thing of using
>> tabs or spaces. I can turn all my tabs to spaces. But a recent post from
>> Glynn suggested that tabs were preferable (for some reason I don't
>> remember).
>
> Hmm; I don't recall that.
>
> Spaces are more robust, as there's no ambiguity as to how many columns
> a space occupies. With tabs, there's always the problem of people
> thinking that tab width is a preference, and then their code isn't
> indented correctly (and, in Python, that means that it doesn't work).
>
> If everyone always, without exception, used tabs for indentation, then
> you could change your editor's tab width with no adverse consequences.
>
> Unfortunately, that's a pretty big "if"; in my experience, any
> approach which relies upon the concept of "without exception" is
> essentially doomed.
>
> Ultimately, it doesn't matter what you use so long as your editor's
> tab width is 8 columns. If it's something else, then you *must* use
> spaces.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Reply | Threaded
Open this post in threaded view
|

Re: Re: a couple of questions

William Kyngesburye
I think using tabs is more of a problem when tabs and spaces are  
mixed.  If ONLY tabs are used, then it doesn't matter what a user's  
preference is - the indents will line up correctly.

On Apr 24, 2007, at 12:13 AM, Michael Barton wrote:

> This is settable in preferences. I can also use spaces I think if  
> that is
> better. Sorry if I misunderstood your earlier comment.
>
> Michael
>
>
> On 4/23/07 9:41 PM, "Glynn Clements" <[hidden email]> wrote:
>
>>
>> Michael Barton wrote:
>>
>>>>>  One thing that I notice is that when we both work on a file,  
>>>>> we apparently
>>>>> have different ways of indenting. This produces errors if not  
>>>>> consistent
>>>>> within a method or sometimes within a class. To get in sync, I was
>>>>> wondering
>>>>> how you do indents—spaces or tabs? If spaces, how many? Glynn  
>>>>> Clements
>>>>> recommended tabs and a common indent distance of 4 spaces.
>>>>
>>>> yes, it must be synchronized. Hm, I am using default python-mode in
>>>> Emacs 21.3.1. On my laptop Emacs 22.x.
>>>
>>> I'm using default python-mode tabs in Eclipse. It may be a thing  
>>> of using
>>> tabs or spaces. I can turn all my tabs to spaces. But a recent  
>>> post from
>>> Glynn suggested that tabs were preferable (for some reason I don't
>>> remember).
>>
>> Hmm; I don't recall that.
>>
>> Spaces are more robust, as there's no ambiguity as to how many  
>> columns
>> a space occupies. With tabs, there's always the problem of people
>> thinking that tab width is a preference, and then their code isn't
>> indented correctly (and, in Python, that means that it doesn't work).
>>
>> If everyone always, without exception, used tabs for indentation,  
>> then
>> you could change your editor's tab width with no adverse  
>> consequences.
>>
>> Unfortunately, that's a pretty big "if"; in my experience, any
>> approach which relies upon the concept of "without exception" is
>> essentially doomed.
>>
>> Ultimately, it doesn't matter what you use so long as your editor's
>> tab width is 8 columns. If it's something else, then you *must* use
>> spaces.
>
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
>
> _______________________________________________
> grassgui mailing list
> [hidden email]
> http://grass.itc.it/mailman/listinfo/grassgui

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do  
if you ARE a maniacally depressed robot?  No, don't try and answer,  
I'm 50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy



_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui