[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python Rocks!



Barry A. Warsaw wrote on 948239931:
> 
> >>>>> "JvR" == Just van Rossum <just@letterror.com> writes:
> 
>     JvR> To *many* people 8 spaces indentation is just too much. Look
>     JvR> at the Python library: 4 spaces all over! (But had they used
>     JvR> tabs anyone would've been able to decide for themselves...)
> 
> As I'm sure Just knows, but others may not, many of the older Python
> modules used to be 8-spaced.  I think a few still are (Tkinter.py
> perhaps, hard for me to check right now).  But the current standard
> for .py files is 4-space, no tabs.
> 
> Also, if you look at Python's C code you'll see remnants of Guido's
> coding preferences; all the C code is indented 8-spaced.  Sometimes
> you have to get creative to fit everything within an 80 column window!

I indent C code a tab (converting it to spaces when releasing) and
Python code 4 spaces. I don't know why. I'm used to it.

I've also seen:

if a:
   code is here
   while b:
         code is here
   try:
      code is here
   except x:
          code is here

   for c in d:
       code is here
else:
    code is here

funny, er?
   
regards,
Gerrit.

-- 
Please correct any bad English you encounter in my email message!
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O !M !V PS+ PE?
Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK-----

Nederlandse Python mailinglist, python@nl.linux.org
archief: http://mail.nl.linux.org/python/