On May 8, 2:06 pm, v4vijayakumar <[EMAIL PROTECTED]>
wrote:
> When I started coding in python, these two things surprised me.
>
> 1. my code is inconsistently indented with the combination of tabs and
> spaces. Even lines looked intended, but it is not.
The problem is in tab not Python, there is n
Kees Bakker <[EMAIL PROTECTED]> wrote:
>
> So far, I have seen only one editor that understands the difference between
> TABs and indentation, and that is Emacs.
Most vi clones (and the original vi) do too! :-)
E.g. in the clone I use (vile) there are independent settings for
tabstop and shiftw
Kees Bakker wrote:
So far, I have seen only one editor that understands the difference between
TABs and indentation, and that is Emacs.
Oh, well... in .vimrc:
autocmd FileType python set tabstop=8
autocmd FileType python set softtabstop=4
autocmd FileType python set expandtab
--
Gabriel Genellina wrote:
> En Fri, 09 May 2008 10:37:30 -0300, v4vijayakumar <[EMAIL PROTECTED]>
> escribió:
>
>> On May 9, 1:48 pm, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote:
>>> v4vijayakumar a écrit :
>>>
>>> > When I started coding in python, these two things surprised me.
>>>
>>> > 1.
En Fri, 09 May 2008 10:37:30 -0300, v4vijayakumar <[EMAIL PROTECTED]> escribió:
> On May 9, 1:48 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>> v4vijayakumar a écrit :
>>
>> > When I started coding in python, these two things surprised me.
>>
>> > 1. my code is inconsistently indented with
On Fri, 2008-05-09 at 15:08 +, Yves Dorfsman wrote:
> Gabriel Genellina wrote:
>
> >> I see the point of the OP. Couldn't the new-line be used as an
> >> equivalent of ':', for example, do you find this difficult to read:
> >>
> >> if a == 3
> >>do_something()
> >>
> >>
> >> if a == 3:
Gabriel Genellina wrote:
I see the point of the OP. Couldn't the new-line be used as an
equivalent of ':', for example, do you find this difficult to read:
if a == 3
do_something()
if a == 3: do_something()
Yes, it could be done, there are no technical reasons to always force to
use
On May 9, 1:48 pm, Bruno Desthuilliers wrote:
> v4vijayakumar a écrit :
>
> > When I started coding in python, these two things surprised me.
>
> > 1. my code is inconsistently indented with the combination of tabs and
> > spaces. Even lines looked intended, but it is not.
>
> Then you have a prob
Yves Dorfsman a écrit :
(snip)
I see the point of the OP. Couldn't the new-line be used as an
equivalent of ':',
Technically, yes. OTHO, the ':' helps editors doing proper indentation.
--
http://mail.python.org/mailman/listinfo/python-list
Yves Dorfsman a écrit :
Mensanator wrote:
2. python requires to pass "self" to all instance methods
Who uses methods?
Is this a joke ?
Very probably.
What are the alternatives ?
Err... functions ?-)
--
http://mail.python.org/mailman/listinfo/python-list
v4vijayakumar a écrit :
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
Then you have a problem with your code editor - not with Python.
2. python require
En Fri, 09 May 2008 01:47:49 -0300, Yves Dorfsman <[EMAIL PROTECTED]>
escribió:
I see the point of the OP. Couldn't the new-line be used as an
equivalent of ':', for example, do you find this difficult to read:
if a == 3
do_something()
if a == 3: do_something()
And surely, it shoul
On May 8, 11:47�pm, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
> Mensanator wrote:
> >> 2. python requires to pass "self" to all instance methods
>
> > Who uses methods?
>
> Is this a joke ?
Yes.
> What are the alternatives ?
>
>
>
> >> and I missed ":" often. :)
>
> > Try using something like Seed
Mensanator wrote:
2. python requires to pass "self" to all instance methods
Who uses methods?
Is this a joke ?
What are the alternatives ?
and I missed ":" often. :)
Try using something like Seed7, where you have to use "then" with
"if" and "do" with "while" and "end" in every block. M
On May 8, 2:06 am, v4vijayakumar <[EMAIL PROTECTED]>
wrote:
> When I started coding in python, these two things surprised me.
>
> 1. my code is inconsistently indented with the combination of tabs and
> spaces. Even lines looked intended, but it is not.
You must type inconsistently.
I never had s
v4vijayakumar wrote:
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
Even the standard editor Idle tries to guess the intendation, so this
was never a probl
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
2. python requires to pass "self" to all instance methods
and I missed ":" often. :)
--
http://mail.python.org
17 matches
Mail list logo