Compare source code
Tim Harig
usernet at ilthio.net
Thu Nov 4 13:55:55 EDT 2010
On 2010-11-04, Neil Cerutti <neilc at norwich.edu> wrote:
> On 2010-11-04, D'Arcy J.M. Cain <darcy at druid.net> wrote:
Seebs Wrote:
>>> * Not being able to write an auto-indenter, ever, because it
>>> is by design theoretically impossible: Annoying.
>>
>> Right. And in C you can never write an auto-bracer for exactly
>> the same reason.
>
> It's not right, actually. Auto-indent is fairly easy in
> Python. Auto-dedent is the impossible part.
What Seebs is refering to is that it is difficult or impossible to
re-indent Python source automatically after the indent structure has been
broken (such as his email being converted to html on the server or a web
forum without the possibility of <pre> or [code] tags). When C becomes
so obfiscated, you can run it through indent to recover the structure of
the source to something that you are familiar with (I actually think macros
could cause problems; but, Seebs has already admitted weaknesses in the C
preprocessor.). The same is not always true for Python where information
about the code structure may be destroyed.
More information about the Python-list
mailing list