Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74302

What does (A ``quote'' is the character used to open the string, i.e. either ' or ".) mean?

X-Received by 10.66.173.75 with SMTP id bi11mr24395080pac.4.1405001082946; Thu, 10 Jul 2014 07:04:42 -0700 (PDT)
X-Received by 10.182.28.71 with SMTP id z7mr147222obg.16.1405001082804; Thu, 10 Jul 2014 07:04:42 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r10no613096igi.0!news-out.google.com!gf2ni6igb.0!nntp.google.com!r10no613092igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 10 Jul 2014 07:04:42 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=64.229.140.25; posting-account=SZ_svQkAAACWRFG2bDA-zgq8ILyl4-vo
NNTP-Posting-Host 64.229.140.25
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <b0f2c8d2-c5a7-4b12-90f1-4aa8bfed9783@googlegroups.com> (permalink)
Subject What does (A ``quote'' is the character used to open the string, i.e. either ' or ".) mean?
From fl <rxjwg98@gmail.com>
Injection-Date Thu, 10 Jul 2014 14:04:42 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:74302

Show key headers only | View raw


Hi,

For me, it is difficult to understand the last line of the paragraph below in 
parenthesis (A ``quote'' is the character used to open the string, 
i.e. either ' or ".)

It talks about triple-quoted strings. Where is ``quote'' from? It has two ` and '.
What this different ` and ' do for here?

The link is here:
https://docs.python.org/2.0/ref/strings.html

Thank you for helping me to learn Python.


............................
In plain English: String literals can be enclosed in matching single quotes (') or
double quotes ("). They can also be enclosed in matching groups of three single 
or double quotes (these are generally referred to as triple-quoted strings). The
backslash (\) character is used to escape characters that otherwise have a special eaning, such as newline, backslash itself, or the quote character. String literals 
may optionally be prefixed with a letter `r' or `R'; such strings are called raw
strings and use different rules for backslash escape sequences.

In triple-quoted strings, unescaped newlines and quotes are allowed (and are
retained), except that three unescaped quotes in a row terminate the string. (A
``quote'' is the character used to open the string, i.e. either ' or ".)

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

What does (A ``quote'' is the character used to open the string, i.e. either ' or ".) mean? fl <rxjwg98@gmail.com> - 2014-07-10 07:04 -0700
  Re: What does (A ``quote'' is the character used to open the string,  i.e. either ' or ".) mean? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-07-10 16:14 +0200
    Re: What does (A ``quote'' is the character used to open the string,  i.e. either ' or ".) mean? fl <rxjwg98@gmail.com> - 2014-07-10 08:23 -0700
      Re: What does (A ``quote'' is the character used to open the string,  i.e. either ' or ".) mean? MRAB <python@mrabarnett.plus.com> - 2014-07-10 17:48 +0100
      Re: What does (A ``quote'' is the character used to open the string,  i.e. either ' or ".) mean? Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-10 10:22 -0600
  Re: What does (A ``quote'' is the character used to open the string,  i.e. either ' or ".) mean? Joel Goldstick <joel.goldstick@gmail.com> - 2014-07-10 10:14 -0400

csiph-web