Python is readable
steve+comp.lang.python at pearwood.info
Sun Mar 18 02:46:04 CET 2012
On Sat, 17 Mar 2012 21:23:45 +0100, Kiuhnm wrote:
> On 3/16/2012 14:03, Steven D'Aprano wrote:
>> A one line routine is still a routine. There is nothing ungrammatical
>> about "If you can: take the bus.", although it is non-idiomatic
> In another post you wrote
> "Sorry, I was talking about the other sort, the ones who apply the
> grammatical rules used by people in real life. You know the ones:
> Then how do you know that there's nothing ungrammatical about "If you
> can: take the bus" if people don't use it?
Who says it is ungrammatical?
If the list (a list of one item, but still a list) was labelled as a list
If you can: (1) take the bus.
or if the items were offset like this:
If you can:
- take the bus.
(or similar) I wouldn't hesitate to say it was following the same form as
Your mission, should you choose to accept it, is to:
- take the bus ...
- do this
- do that
even though in English we don't usually treat a list of one item as a
list. That would make it unidiomatic but grammatically valid.
But written in line, as you do, I'm not entirely sure. It is more of a
grey area. It is not explicitly written as a list of items, so a colon
seems a bit too "heavy" and I would prefer to write:
If you can, take the bus.
That flows better and is more idiomatic.
On balance, I think it *is* grammatical but only on a technicality (a
little like the (in)famous "Buffalo buffalo buffalo buffalo" sentence),
but poorly written and not idiomatic. Natural languages frequently have
many sentences which obey the grammatical rules and yet nobody uses that
*specific* sentence, either because they feel clumsy, or because they are
semantically meaningless, e.g. "hairless fears deconstruct lustily".
But the problem with "If you can: take the bus" is not the colon or the
initial sentence fragment. It is the fact that it introduces a list of a
single item in a form that doesn't look like a list of items.
This, for example, reads much more naturally:
"If you can: take the bus to work every day; work hard for an
unappreciative boss; give up 40% of your pay in taxes for a war you
disagree with; use the rest to support a family that despises you; remind
yourself that you're still happier than 90% of the people who have every
More information about the Python-list