Python, are you ill?

castironpi at gmail.com castironpi at gmail.com
Mon May 12 01:30:58 EDT 2008


On May 11, 6:26 pm, Tim Roberts <t... at probo.com> wrote:
> wxPytho... at gmail.com wrote:
>
> >If you are in the interactive prompt of the Python interpreter and you
> >do this
>
> >print """Testing\"""   or   print '''Testing\'''
>
> >you get three dots [...] as if Python expects a code block.
>
> ...which it does.
>
> >If you
> >press Enter, you get three dots again, and again, and again... You
> >can't get out of the code block with pressing the Enter key; you have
> >to press Ctrl+Z (if you're in Linux) in order to get out of that code
> >block,
>
> No, you don't.  You can also enter """ or ''' to properly close the quote.
>
> >If you do
>
> >print "Testing\"   or   print 'Testing\'
>
> >you get an error, but not of you use the triple quotes. Is that a bug
> >in the interpreter perhaps?
>
> As a general rule, when you are just beginning to learn some product, it is
> safe to assume that anything you see as a bug in the product is almost
> certainly a flaw in your understanding of the product.
> --
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.

I hold further, it is more profitable, unless you can change it.



More information about the Python-list mailing list