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


Groups > comp.lang.python > #53236

Re: semicolon at end of python's statements

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <antoon.pardon@rece.vub.ac.be>
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; 'python.': 0.02; 'python,': 0.02; 'programmer': 0.03; 'syntax': 0.04; 'received:134': 0.05; 'compiler': 0.07; 'needed,': 0.07; 'odd': 0.07; 'executed': 0.09; 'indication': 0.09; 'obligated': 0.09; 'statements': 0.09; 'python': 0.11; 'language,': 0.12; '*any*': 0.16; 'agree.': 0.16; 'brace': 0.16; 'iirc': 0.16; 'indications': 0.16; 'jr.': 0.16; 'marker': 0.16; 'nesting': 0.16; 'readable': 0.16; 'redundancy': 0.16; 'say.': 0.16; 'semicolon': 0.16; 'subject:python': 0.16; 'language': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'wed,': 0.18; 'all,': 0.19; "python's": 0.19; 'fit': 0.20; 'programming': 0.22; 'aug': 0.22; 'putting': 0.22; 'header:User-Agent:1': 0.23; 'file.': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'feature': 0.29; "i'm": 0.30; 'code': 0.31; 'follows': 0.31; 'gary': 0.31; 'indentation': 0.31; 'option.': 0.31; 'subject:end': 0.31; 'file': 0.32; 'languages': 0.32; 'totally': 0.33; 'copying': 0.34; 'sense': 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'problem.': 0.35; '(2)': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'c++': 0.36; 'yours,': 0.36; "didn't": 0.36; 'should': 0.36; 'error.': 0.37; 'two': 0.37; 'sometimes': 0.38; 'stopped': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'read': 0.60; 'truly': 0.60; 'most': 0.60; 'lower': 0.61; 'kind': 0.63; 'myself': 0.63; 'skip:n 10': 0.64; 'great': 0.65; 'dear': 0.65; 'between': 0.67; 'introduction': 0.68; 'lose': 0.68; 'sam': 0.68; 'introduce': 0.78; '(only)': 0.84; 'burdensome': 0.84; 'easier,': 0.84; 'experiment': 0.84; 'forced': 0.84; 'pardon': 0.84; 'absolutely': 0.87; 'hand,': 0.93; 'wishing': 0.93; '2013': 0.98
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result Ap4EAMcdH1KGuA9G/2dsb2JhbABaxDWBQIMYAQEEAXgGCwsYCRYIBwkDAgECATQREwYCAod3Bq9uiROPexaEBgOXc4YYi06DIg
Date Thu, 29 Aug 2013 12:11:41 +0200
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
MIME-Version 1.0
To python-list@python.org
Subject Re: semicolon at end of python's statements
References <1377735506.18906.15.camel@debian> <CAOFF+Z2pzByRuh77FhZjw3pfsJGgy6+tuV2+shP5iu8Q9eBe5g@mail.gmail.com> <521EFD50.9060900@digipen.edu>
In-Reply-To <521EFD50.9060900@digipen.edu>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.357.1377771103.19984.python-list@python.org> (permalink)
Lines 65
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1377771103 news.xs4all.nl 16007 [2001:888:2000:d::a6]:39868
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53236

Show key headers only | View raw


Op 29-08-13 09:50, Gary Herron schreef:
> On 08/28/2013 07:10 PM, Sam Fourman Jr. wrote:
>>
>> On Wed, Aug 28, 2013 at 8:18 PM, Mohsen Pahlevanzadeh
>> <mohsen@pahlevanzadeh.org <mailto:mohsen@pahlevanzadeh.org>> wrote:
>>
>>     Dear all,
>>
>>     I'm C++ programmer and unfortunately put semicolon at end of my
>>     statements in python.
>>
>>     Quesion:
>>     What's really defferences between putting semicolon and don't put?
>>
>>     Yours,
>>     Mohsen
>>
>>
>> I totally understand where you are coming from, but
>> I have found that the thing I can't get used to is the "indent thing"
>>
>> Python is a great language, but I always secretly find myself
>> wishing I could somehow use python, and not deal with the mandatory
>> "indents"
>>
>>
>> Sam Fourman Jr.
>>
> 
> What an odd thing to say.  In what sense do you consider indents to be
> non-mandatory in other languages?  In *any* programming language, if you
> write code without indents, it is absolutely unreadable, absolutely
> unmaintainable, and you will be absolutely fired!

Sure but the most readable indentation is not always the indentation
that follows the formal structure. Also IIRC it stopped the
introduction of a number of language features because the feature
didn't seem to fit pythons obligated indentation.

Without the forced indentation, one could introduce the feature and
have people experiment with what kind of indentation works best. Now
that wasn't an option.

> Other languages force you (and your editor) to maintain two indications
> of nesting, (1) indentation, so you can read it, and (2)
> braces/begin/end/whatever, so the compiler can read it.  Neither one is
> truly optional, and woe to you if the two don't match.  On the other
> hand, Python's use of indentation as the (only) indication of nesting is
> readable by both humans and parsers.

Sure but it means you lose redundancy and so sometimes that means it
is harder to find the problem. I remember the time that I somehow
ended up copying part of a function lower in the file. Now because
there was no need of a right brace or end or whatever this file
executed without a problem but redefined the function into an incomple
one. Should some kind of end marker be needed, the problem would have
been found much easier, because if would have produced a syntax error.

> Looked at that way, other languages seem foolish and burdensome and
> Python's indentation is the only sensible way.

I don't agree.

-- 
Antoon Pardon

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


Thread

Re: semicolon at end of python's statements Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-08-29 12:11 +0200

csiph-web