Mailinglist Archive: opensuse (1473 mails)

< Previous Next >
Re: [opensuse] editor that does not eat out TAB characters
  • From: nordi <nordi@xxxxxxxxxxxx>
  • Date: Tue, 16 Jun 2009 18:18:35 +0200
  • Message-id: <4A37C5DB.1060006@xxxxxxxxxxxx>
G T Smith wrote:
Indentation based block definition has some limitations.
I would like to know about those limitations. You can use blocks for
scoping variables even when those blocks are 'only' defined with
indentation. Python does not do that, but that does not mean it cannot
be done. Anything else?

A minor issue. Which for any half way decent IDE would be reformatted as ..
You are assuming that you have an IDE ready when you do the development.
This only holds true until you have to work on a customers server over
ssh to fix a bug. And it assumes you always write your programs with an
IDE. I, at least, do not edit my shell scripts with Eclipse. Neither
would I write Python or Perl programs of just 50 lines with a big IDE.

BTW Some consider it good practice in C/C++ and similar to use the form...

if (1 == foo) bar();

to avoid accidents like

if (foo = 1) bar();
Yes, that is certainly good practice. But the second example will get
you a syntax error in Python, another kind of mistake you cannot make in
that language. Probably a lesson learned from C.

A note to the TO: When you try to get the program to work, make sure you
use the same version of Python that was used to program it. Some other
distributions ship rather old Python versions (their package management
uses Python, so they are much more conservative with new Python
versions). If your program was written for one of the old versions it
may give you trouble with Python version 2.6 that ships with current
openSuse distributions.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups