473,666 Members | 2,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

From python-dev, space vs. tab controversy finally settled


Here's a summary of the final decision Guido made concerning how
Python will indent code in the future, from python-dev:

Guido had been planning to deprecate tabs in favor of spaces for
awhile, although there have been good arguments for both tabs and
spaces. But he was never really comfortable pulling the rug out from
half the user base. However, today he finally decided on a compromise
that has all the benefits of both spaces and tabs.

His decision was predicated by the recent decision of the Unicode
Consortium to allocate some new codes for special use in programming
languages. The Consortium allocated codes for (among other things):
several sets of left and right braces, several sets of quote
characters, a couple universal comment markers, and several
metacharacters for use in regular expressions.

However, the code that influenced Guido was a special indent code.
Here's how it works: at the beginning of the line, you put in one
"indent character" for each level of indentation. Because Python will
support Unicode fully by 3.0, Guido decided that this new Unicode
character will be the one and only way to indent Python code.

Now, I'm sure everyone's aware that Unicode is getting kind of full,
and so, rather than allocating precious ununsed slots to the new
programming characters, the Consortium decided reallocate some codes
that had been rarely used. These codes fall in the range 0001 through
001F, excepting 000A and 001A (all codes in hexadecimal). The new
indent character has code 0009.

So, you should start using Unicode character 0009 to indent right
away. Python 2.4 will deprecate all indentation not using the new
indent character, and Python 3.0 will not support any other
indentation.
--
CARL BANKS http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work."
-- Parody of Mr. T from a Robert Smigel Cartoon
Jul 18 '05 #1
10 1799
Carl Banks wrote:
Here's a summary of the final decision Guido made concerning how
Python will indent code in the future, from python-dev:

Guido had been planning to deprecate tabs in favor of spaces for
awhile, although there have been good arguments for both tabs and
spaces. But he was never really comfortable pulling the rug out from
half the user base. However, today he finally decided on a compromise
that has all the benefits of both spaces and tabs.

His decision was predicated by the recent decision of the Unicode
Consortium to allocate some new codes for special use in programming
languages. The Consortium allocated codes for (among other things):
several sets of left and right braces, several sets of quote
characters, a couple universal comment markers, and several
metacharacters for use in regular expressions.

However, the code that influenced Guido was a special indent code.
Here's how it works: at the beginning of the line, you put in one
"indent character" for each level of indentation. Because Python will
support Unicode fully by 3.0, Guido decided that this new Unicode
character will be the one and only way to indent Python code.

Now, I'm sure everyone's aware that Unicode is getting kind of full,
and so, rather than allocating precious ununsed slots to the new
programming characters, the Consortium decided reallocate some codes
that had been rarely used. These codes fall in the range 0001 through
001F, excepting 000A and 001A (all codes in hexadecimal). The new
indent character has code 0009.

So, you should start using Unicode character 0009 to indent right
away. Python 2.4 will deprecate all indentation not using the new
indent character, and Python 3.0 will not support any other
indentation.

Great april fools joke, but no such conversation has gone on in
Python-Dev in the last 3 months.

Better luck next time.

- Josiah
Jul 18 '05 #2
Heyho!

Carl Banks wrote:
Here's a summary of the final decision Guido made concerning how
Python will indent code in the future, from python-dev:

Guido had been planning to deprecate tabs in favor of spaces for
awhile, although there have been good arguments for both tabs and
spaces. But he was never really comfortable pulling the rug out from
half the user base. However, today he finally decided on a compromise
that has all the benefits of both spaces and tabs.
[...]
So, you should start using Unicode character 0009 to indent right
away. Python 2.4 will deprecate all indentation not using the new
indent character, and Python 3.0 will not support any other
indentation.


Nah, this sucks! This will be the death of Python! I'm switching to
Whitespace: http://compsoc.dur.ac.uk/whitespace/

Stay Rude!
Wolfram

Jul 18 '05 #3
[Carl Banks]
Here's a summary of the final decision Guido made concerning how
Python will indent code in the future, from python-dev:

[Nice April Fool spoof :-) elided]

[Josiah Carlson] Great april fools joke, but no such conversation has gone on in
Python-Dev in the last 3 months.

Better luck next time.


Spoil-sport!

You could have at least given it a few *minutes* to get some traction!

--
alan kennedy
------------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/contact/alan
Jul 18 '05 #4
Josiah Carlson wrote:
Carl Banks wrote:
[snip]
Great april fools joke, but no such conversation has gone on in
Python-Dev in the last 3 months.

Better luck next time.

- Josiah


Yeah, thanks Josiah. Well all know how bright you are already though,
and it's customary (though an unspoken custom, perhaps, until now) to
chuckle quietly at such things and wait a while before posting, just to
give an opportunity for the unwary ones to get sucked in for a while.

Anyway, you forgot to point out that the *real* conclusion from the
python-dev discussions was that Guido has finally decided that the
space vs. tab wars will _never_ be won, and chooses explicit over
implicit yet again. The indentation style for Python 3.0 (not 2.4)
will be leading periods, since they make the indentation more obvious
and thus avoid mistakes.

-Peter
Jul 18 '05 #5
Josiah Carlson <jc******@uci.e du> writes:
Great april fools joke, but no such conversation has gone on in
Python-Dev in the last 3 months.
You just didn't get those mails.

Cheers,
mwh

-- It might get my attention if you'd spin around in your chair,
spoke in tongues, and puked jets of green goblin goo.

I can arrange for this. ;-) -- Barry Warsaw & Fred Drake
Jul 18 '05 #6
Josiah Carlson:
Great april fools joke, but no such conversation has gone on in
Python-Dev in the last 3 months.


You're right, there was a typo. It should have been python-internals.
That started last fall because there was too much noise and riff-raff
on python-dev.

Andrew
da***@dalkescie ntific.com
Jul 18 '05 #7
> Spoil-sport!

You could have at least given it a few *minutes* to get some traction!


It was right at the top for the last message I read last night. It was
unlucky. Sorry to the original poster for ruining the joke so early.

- Josiah
Jul 18 '05 #8
> Yeah, thanks Josiah. Well all know how bright you are already though,
and it's customary (though an unspoken custom, perhaps, until now) to
chuckle quietly at such things and wait a while before posting, just to
give an opportunity for the unwary ones to get sucked in for a while.
Yeah, I suppose I should try not to ruin the joke quite so soon next time.

Anyway, you forgot to point out that the *real* conclusion from the
python-dev discussions was that Guido has finally decided that the
space vs. tab wars will _never_ be won, and chooses explicit over
implicit yet again. The indentation style for Python 3.0 (not 2.4)
will be leading periods, since they make the indentation more obvious
and thus avoid mistakes.


Now that is funny.
If you want to see another good Python joke, I like this one:
Python for Commodore 64.
http://zephyrfalcon.org/weblog/arch_...3_27.html#e536

Not terribly believable, but still good.

- Josiah
Jul 18 '05 #9
Wolfram Kraus wrote:


Heyho!

Carl Banks wrote:
Here's a summary of the final decision Guido made concerning how
Python will indent code in the future, from python-dev:

Guido had been planning to deprecate tabs in favor of spaces for
awhile, although there have been good arguments for both tabs and
spaces. But he was never really comfortable pulling the rug out from
half the user base. However, today he finally decided on a compromise
that has all the benefits of both spaces and tabs.

[...]
So, you should start using Unicode character 0009 to indent right
away. Python 2.4 will deprecate all indentation not using the new
indent character, and Python 3.0 will not support any other
indentation.


Nah, this sucks! This will be the death of Python! I'm switching to
Whitespace: http://compsoc.dur.ac.uk/whitespace/


You people are missing it. Look at what the new indent character is.
(It's always funnier when you have to explain it.)
--
CARL BANKS http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work."
-- Parody of Mr. T from a Robert Smigel Cartoon
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
6731
by: hokiegal99 | last post by:
This script works as I expect, except for the last section. I want the last section to actually remove all spaces from the front and/or end of filenames. For example, a file that was named " test " would be renamed "test" (the 2 spaces before and after the filename removed). Any suggestions on how to do this? import os, re, string print " " print "--- Remove '%2f' From Filenames ---" print " "
2
2892
by: satish | last post by:
Hello all, I have a shared object executable viz. *cable* which I execute as follows : $ ansyscust71 -custom cable -p ANSYSRF **ansyscust71 is a shell script and is a part of a software called ANSYS** Now, I have generated a python module using a *fortran-python interface
2
14353
by: Jorgen Grahn | last post by:
I couldn't think of a good solution, and it's hard to Google for... I write python command-line programs under Win2k, and I use the bash shell from Cygwin. I cannot use Cygwin's python package because of a binary module which has to be compiled with Visual C 6. My scripts start with a '#!/usr/bin/env python' shebang, as God intended. Now, I assume I can make cmd.exe run foo.py by asociating *.py with the python interpreter.
1
1769
by: John fabiani | last post by:
Hi, I have a script that is not running on a freeBSD 4.4 with Python 2.1 that uses ftplib. I'm wondering if it's possible to update only the ftplib module from 2.1 to 2.3. I only ask because I have no idea how to upgrade anything for freeBSD 4.4. I know there is are doc's available but I sure don't want to screw anything up on the freeBSD 4.4 server because I didn't understand what I was doing. Thanks John
13
3332
by: Ajay | last post by:
hi! can you call a Python application from a Java program? does this require any additional package to be installed? thanks cheers
9
1526
by: Nico Grubert | last post by:
Hi there, Background of this question is: I want to convert all words <word> except 'and' / 'or' / 'and not' from a string into '*<word>*'. Example: I have the following string: "test and testing and not perl or testit or example"
7
4863
by: alexandre_irrthum | last post by:
Hi there, I am trying to use pyserial to read data from a temperature logger device (T-logger). T-logger is based on the DS1615 temperature recorder chip (Dallas Semiconductor). According to the DS1615 docs, writing to the chip is performed one byte at a time. To read from the chip, one must issue the "read page" command (33h), followed by the two-byte address of the requested page (pages are 32 bytes long). After receiving this, the...
13
4177
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them from the html page (replace the words in the html page with blank space) I'm new to python and could use a little push in the right direction, any ideas on how to implement this? Thanks!
7
20552
by: Ron Adam | last post by:
from __future__ import absolute_import Is there a way to check if this is working? I get the same results with or without it. Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win 32 _Ron
1
2783
by: Martin Rubey | last post by:
Dear all, I'm trying to call from common lisp functions written for Sage (www.sagemath.org), which in turn is written in python. To do so, I tried http://common-lisp.net/project/python-on-lisp/. It was quite easy to get it to run and do some simple things with python. However, I was unable to get sage to run within it. If I start my local python 2.5 and follow (roughly)
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6191
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.