Spaces and tabs again

Paul Watson pwatson at redlinepy.com
Sun Aug 14 23:39:55 EDT 2005


John Machin wrote:
> Paul Watson wrote:
> 
>> Dan Sommers wrote:
>>
>>> On Sun, 14 Aug 2005 01:04:04 GMT,
>>> Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>>>
>>>
>>>> On 13 Aug 2005 13:18:21 -0700, sigzero at gmail.com declaimed the 
>>>> following
>>>> in comp.lang.python:
>>>
>>>
>>>
>>>
>>>>> Are you kidding? You are going to MANDATE spaces?
>>>>>
>>>>
>>>>     After the backlash, Python 4.0 will ban leading spaces and require
>>>> tabs <G>
>>>
>>>
>>>
>>>
>>> Why not petition the unicode people to include PYTHON INDENT and PYTHON
>>> DEDENT code points, and leave the display up to the text editors?  ;-)
>>>
>>> Regards,
>>> Dan
>>
>>
>>
>> The Unicode people will correctly point out that there is already a 
>> Unicode codepoint assignment which can be used for this purpose.  It 
>> is even in the BMP portion of the C0 controls group.
>>
>>     0009 = HORIZONTAL TABULATION
> 
> 
> and how do you use this to get the DEDENT effect? Use something out of 
> the bidirectional kit? E.g. RLO then tab then PDF ;-)

The use of one less HORIZONTAL TABULATION on a line in relation to the 
number of HORIZONTAL TABULATION codepoints used by the pervious line 
indicated "dedent" as you call it. :-)

There are things about your suggestion that would be great!  It would 
require a language aware editing tool to be used.  Like HTML was 
intended, the rendering of the program source would be managed by the 
tool.  Everyone could choose the style in which they would like to 
interact with the code.

This is also the biggest problem.  It would mean that a specialized 
editor tool would be required.  One could not just use a POTE (Plain Old 
Text Editor).

Using U+0009 HORIZONTAL TABULATION would provide both user selectable 
rendering style as well as access through most existing tools.

Of course, there is always 'expand' and 'unexpand' if you are really 
desparate.



More information about the Python-list mailing list