An interesting beginner question: why we need colon at all in the python language?
anthony.hw.kong at gmail.com
Wed Jul 13 12:40:40 CEST 2011
Thanks, mate! I was writing that up really late at night. Somehow I changed
term to semi-colon half way through,
On Wed, Jul 13, 2011 at 5:36 PM, Thorsten Kampe
<thorsten at thorstenkampe.de>wrote:
> * Dave Angel (Mon, 11 Jul 2011 10:36:48 -0400)
> > On 01/-10/-28163 02:59 PM, Anthony Kong wrote:
> > > My immediate response is: it allows us to fit statements into one
> > > line. e.g.
> > > if a == 1: print a
> > >
> > You're confusing the colon with the semi-colon. If you want two
> > statements on the same line, you use a semi-colon.
> He's not confusing anything at all. His example made it pretty clear
> that he didn't mean "two statements" but "multiline statemements".
Don’t EVER make the mistake that you can design something better than what
you get from ruthless massively parallel trial-and-error with a feedback
cycle. That’s giving your intelligence *much* too much credit.
- Linus Torvalds
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list