[
Lists Home |
Date Index |
Thread Index
]
"In reality, and despite the precedent set by make, Python's use of indentation
for delimiting blocks is very rarely a problem. As long as the indentation is
consistent, Python is happy. When tabs and spaces are mixed, Python uses the
rule that 1 tab is 8 spaces, (well, a tab takes you to the next tabstop, with
tabstops at 8, 16, ...). Most people like to use an indent level of 4.
Fortunately, almost all modern editors allow you to use the tab key and get 4
spaces, so Python need never fall back to these rules. If you find a file with
an inconsistent mixture of tabs and spaces, it will normally be visually
obvious. It will also normally produce syntax errors instead of incorrect
control flow. Executing Python with the -t or -tt options will make if very
obvious."
http://www.mcmillan-inc.com/python_index.html
At 23/10/2002 14:56:00, tblanchard@mac.com wrote:
# On Wednesday, October 23, 2002, at 03:48 PM, John Cowan wrote:
# >
# > Python is essentially Scheme with indentation instead of parentheses.
#
# Yeah, which seems fragile to me considering the number of programs and
# editors I have lying around that silently convert tabs to n spaces and
# vice versa - it just doesn't strike me as a robust syntax design.
#
#
# -----------------------------------------------------------------
# The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
# initiative of OASIS <http://www.oasis-open.org>
#
# The list archives are at http://lists.xml.org/archives/xml-dev/
#
# To subscribe or unsubscribe from this list use the subscription
# manager: <http://lists.xml.org/ob/adm.pl>
#
Roger
|