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


Groups > comp.lang.python > #65725

Vedr: What does """ means in python?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <gvanem@yahoo.no>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'sys': 0.07; '@echo': 0.09; 'comment,': 0.09; 'exit': 0.09; 'lines.': 0.09; 'skip:\\ 10': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'language.': 0.14; 'windows': 0.15; "%s'": 0.16; "'''": 0.16; 'exploits': 0.16; 'newlines': 0.16; 'rem': 0.16; 'subject:python': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'variable': 0.18; '8bit%:5': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'skip:\xa0 20': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'code': 0.31; 'file:': 0.31; 'quotes': 0.31; 'actual': 0.34; 'but': 0.35; 'done': 0.36; 'subject:?': 0.36; 'files': 0.38; 'fact': 0.38; 'called': 0.40; 'how': 0.40; 'received:212.82': 0.60; "you're": 0.61; "you'll": 0.62; 'to:addr:gmail.com': 0.65; 'header:Reply- To:1': 0.67; 'bothered': 0.68; 'from:addr:yahoo.no': 0.84; 'look.': 0.84; 'picasso': 0.84; 'received:108': 0.93
X-Yahoo-Newman-Property ymail-3
X-Yahoo-Newman-Id 300367.60076.bm@omp1006.mail.ir2.yahoo.com
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.no; s=s1024; t=1391924971; bh=d8O58QFRKk24Ibve8GXXmJoP9pzvtBExMp16WLGbKVQ=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=QdpPg23eyzV2oJez0l0OvZkDlvJJFoF95zM7oo/kp8i3fGORhRjsiSDWw3PlhcI7B91Qy9/kJlXlka7kd3gFBOu/m14JbEsyWDxnJDePg1jPAhdWWAO/U9lOHg/UBTBWgM0IbUKQ/qPO7YtDRyXVOJlYixh6q/uYi6zpFgReoO0=
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.no; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6EJNEyvZjnzZRMk0UII2QYF/FkrTVdBsHUHrQJ2aiBbWaWFOTN/coE+qOrxapIKaWDMsRbgIS+OA4OsLIDyR0zgGHhVQ1tgxqCcKdtT5bNjKyv8Usf2IMucWzsfSAD9ZLuMofsk4LZNsUsC0dCs7zv5D/m6RQoR3mlKsZMuA5c4=;
X-YMail-OSG 2QD2zvEVM1mMAFIIPMwQgOu39fGYDO3H1ai0gmKJ0T0QsEV YjEnBaSOKPzwoxSKAken4nXzSH1x6oo84HJmC874Z0RUwjyKqjXKjyUTFm6U LZpUsEPeU7DC90REiF0G9jcNM41Do.OmigVWRraUM6FTAhe.rLDEnKZfXz4K InfyGqLas1NmLKn0Q33liMIU7tFu9OrZqWbEgVg69oYkggXejAn1fm7TxChl AtAp3CJlLC5dHU5tdpHl1ruubBzr8o0Q6i4GSpssOydtdtQyZmOu96aLAVBr aNHUl5B4QirK1RxtoopvvjHJtQjs1KWr8NS9sVxH20lzXvcqOaBe0eN5xNZO _ht1OUGKnDQIXN7W3Hrwm7J9qLxdSdsBHJuRmQW.CJPZQl3TquCCGu6OoAiJ half_FbymhXYRf0zI69asDveACdMnPveluJ5Cz2UrVVV.Ww33YZ0e5MO4sIu o7IuJHjsIYfg5D_sjpOPR08DhsqJwFohO6QuiE0uun9eWl.SSNfTGIQLr83e bw0kVLtoaytnMdvkg3Ds__YfcxUEvbZZ0cKTdVx9AnyWDXu7PlA--
X-Rocket-MIMEInfo 002.001, CgrCoApHaXNsZSBWLgoKCiJDb21wdXRlcnMgYXJlIHVzZWxlc3MuIFRoZXkgY2FuIG9ubHkgZ2l2ZSBhbnN3ZXJzIiAgLS1QYWJsbyBQaWNhc3NvCkNocmlzIEFuZ2VsaWNvIDxyb3N1YXZAZ21haWwuY29tPiB3cm90ZToKCj4gRm9yIFNRTD8gSWdub3JlIHRoZSBleHRyYSBzcGFjZXMsIGl0J3MgYSBmcmVlLWZvcm0gbGFuZ3VhZ2UuIFRoZSBvbmx5Cj4gcmVhc29uIHRvIGNvbnNpZGVyIGRlZGVudCgpIHdvdWxkIGJlIGlmIHlvdSdyZSB3b3JyaWVkIGFib3V0IGhvdyB5b3VyCj4gbG9nIGZpbGVzIHdpbGwgbG8BMAEBAQE-
X-Mailer YahooMailWebService/0.8.175.632
References <72a7dd52-7619-4520-991e-20db7ce55ba3@googlegroups.com> <roy-C8B893.09080908022014@news.panix.com> <ld6237$ju9$1@news.albasani.net> <CAPTjJmp-g0KOYzs9dd_C_E75SyiOSwfDKBu1LFOBdiWHR8CUwQ@mail.gmail.com>
Date Sun, 9 Feb 2014 05:49:31 +0000 (GMT)
From Gisle Vanem <gvanem@yahoo.no>
Subject Vedr: What does """ means in python?
To Chris Angelico <rosuav@gmail.com>
In-Reply-To <CAPTjJmp-g0KOYzs9dd_C_E75SyiOSwfDKBu1LFOBdiWHR8CUwQ@mail.gmail.com>
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding quoted-printable
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To Gisle Vanem <gvanem@yahoo.no>
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6570.1391925165.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391925165 news.xs4all.nl 2869 [2001:888:2000:d::a6]:50877
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65725

Show key headers only | View raw



 
Gisle V.


"Computers are useless. They can only give answers"  --Pablo Picasso
Chris Angelico <rosuav@gmail.com> wrote:

> For SQL? Ignore the extra spaces, it's a free-form language. The only
> reason to consider dedent() would be if you're worried about how your
> log files will look. The actual execution of SQL won't be bothered by
> newlines and spaces/tabs.

Regrading handy uses of ''', you learned me one trick when using Python 
code in a Windows .bat file:


  rem = '''
  @echo off
  echo This is 
batch
  \python32\python %0
  echo All done
  exit /b
  rem '''
  import 
sys
  print("This is Python")
  for i,p in 
enumerate(sys.path):
     print('sys.path[%2d]: %s' % (i, p))
  print("Python 
done")

You'll have a variable in Python called 'rem' which contains all 
your
batch code :) It exploits the fact that 'rem' makes a 
one-line
comment, but the triple quotes go across multiple lines.

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


Thread

What does """ means in python? Sam <lightaiyee@gmail.com> - 2014-02-08 06:02 -0800
  Re: What does """ means in python? Roy Smith <roy@panix.com> - 2014-02-08 09:08 -0500
    Re: What does """ means in python? Walter Hurry <walterhurry@gmail.com> - 2014-02-08 19:55 +0000
      Re: What does """ means in python? Chris Angelico <rosuav@gmail.com> - 2014-02-09 08:40 +1100
      Vedr: What does """ means in python? Gisle Vanem <gvanem@yahoo.no> - 2014-02-09 05:49 +0000
        Re: Vedr: What does """ means in python? Duncan Booth <duncan.booth@invalid.invalid> - 2014-02-10 10:50 +0000

csiph-web