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


Groups > comp.lang.python > #53620

Re: how does not work nested comment in python?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'subject:not': 0.03; 'syntax': 0.04; 'question?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:comment': 0.16; 'syntaxerror:': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'print': 0.22; 'header:User- Agent:1': 0.23; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; '"",': 0.31; 'file': 0.32; 'not.': 0.33; 'comment': 0.34; 'charset :us-ascii': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'email addr:gmail.com': 0.63; 'invalid': 0.68
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: how does not work nested comment in python?
Date Wed, 4 Sep 2013 12:08:50 +0000 (UTC)
References <551579b9-951e-4f46-bb10-488d39eac6a7@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 174.32.174.36
User-Agent XPN/1.2.6 (Street Spirit ; Linux)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
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.39.1378296555.5461.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378296555 news.xs4all.nl 15882 [2001:888:2000:d::a6]:58685
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53620

Show key headers only | View raw


On 4/9/2013 02:13, vnkumbhani@gmail.com wrote:

> example: 
>  
> print "hello" # print comment +"world"    => single line comment

>>> print "hello" # print comment +"world"    => single line comment
hello


> print "hello" '''print comment''' +"world"   => multiple line comment

>>> print "hello" '''print comment''' +"world"   => multiple line comment
  File "<stdin>", line 1
    print "hello" '''print comment''' +"world"   => multiple line comment
                                             ^
SyntaxError: invalid syntax
>>> print "hello" '''print comment''' +"world"
helloprint commentworld

What is your question?  The first line has a comment on it, the second
one does not.

-- 
DaveA

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


Thread

how does not work nested comment in python? vnkumbhani@gmail.com - 2013-09-03 23:13 -0700
  Re: how does not work nested comment in python? Vlastimil Brom <vlastimil.brom@gmail.com> - 2013-09-04 09:55 +0200
  Re: how does not work nested comment in python? Dave Angel <davea@davea.name> - 2013-09-04 12:08 +0000

csiph-web