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


Groups > comp.lang.python > #46422

Re: How clean/elegant is Python's syntax?

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <damage3025@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'value,': 0.04; 'subject:Python': 0.06; 'dan': 0.09; 'oh,': 0.09; 'whole,': 0.09; 'subject:How': 0.10; 'python': 0.11; 'language.': 0.14; 'elsewhere.': 0.16; 'graceful.': 0.16; 'semantics': 0.16; 'to:name:python list': 0.16; 'tuple': 0.16; 'wrote:': 0.18; "python's": 0.19; "skip:' 30": 0.19; 'thu,': 0.19; 'programming': 0.22; 'print': 0.22; 'decorators': 0.24; 'looks': 0.24; 'least': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'pascal': 0.31; 'this.': 0.32; 'another': 0.32; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'var': 0.36; 'method': 0.36; 'subject:?': 0.36; 'example,': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'kind': 0.63; 'such': 0.63; 'interest': 0.64; 'more': 0.64; '30,': 0.65; 'beautiful': 0.68; 'exercise.': 0.84; 'touched': 0.84; 'imagine': 0.93; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=GMBusC+p9u3QqPxoMBMSkqAYgTGEn7bVVLV+BDnOmNQ=; b=R8yqHK2F2E25D0fsMDh8Wyw1fam8h27CKcR/ApeV1nxdgGm9tjibWspQwX3dZhMnTg t/zM38QOISesh0Y8H7MGUeSUxObZvsIk383T/is5GWPX9U33H3Rctr1JlkE1OMY1WSxu uPLlWUJW/t/DlAucdV2/bdaAZ7dBO4rDato3CxEGioY1KTJc35WYsBRDKEa7I87AjI2d nIgj0jVD6528ZwT0gUVFett+k7Jxp7xTcYLPruWoDhalxoXroPjM0MbNW2/b01Pe1vfp t0qDmBEvAMC1uJ5ijAXpfbRoCxe/ju33rvYdmEHt+YKiyHQ3bt84oKcedhOC8+xrMk++ nxlA==
X-Received by 10.112.154.67 with SMTP id vm3mr2551776lbb.90.1369876466346; Wed, 29 May 2013 18:14:26 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAGGBd_oT=vqvPGZy+d1H=XHjdPCmYUxJMXAwii7WH845xrYybQ@mail.gmail.com>
References <CAGVx7UWXAFHSHq37Ep-Vk=cM2wYrEGHSUhNc8s43bCvj_VcVow@mail.gmail.com> <CAGGBd_oT=vqvPGZy+d1H=XHjdPCmYUxJMXAwii7WH845xrYybQ@mail.gmail.com>
From Ma Xiaojun <damage3025@gmail.com>
Date Thu, 30 May 2013 09:14:06 +0800
Subject Re: How clean/elegant is Python's syntax?
To Python List <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.2389.1369876474.3114.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369876474 news.xs4all.nl 15898 [2001:888:2000:d::a6]:39832
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46422

Show key headers only | View raw


On Thu, May 30, 2013 at 8:24 AM, Dan Stromberg <drsalists@gmail.com> wrote:
> I'm finding it kind of hard to imagine not finding Python's syntax and
> semantics pretty graceful.
>
> About the only thing I don't like is:
>
>    var = 1,
>
> That binds var to a tuple (singleton) value, instead of 1.
>
> Oh, and method decorators seem much more complex than they should've been.

Yes, you touched something. IMHO, Python has far more built-in
features so it looks at least complicated from time to time.

For example, some people use "generating 9x9 multiplication table" as
an programming exercise.

What interest me is a one liner:
print '\n'.join(['\t'.join(['%d*%d=%d' % (j,i,i*j) for i in
range(1,10)]) for j in range(1,10)])

I don't like code like this. But Python at least allow such practise.

> But on the whole, python is a pretty beautiful language.  It's not just
> another rehash of Pascal though; if that's what you want you might be better
> off looking elsewhere.

That's a fair point.

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


Thread

Re: How clean/elegant is Python's syntax? Ma Xiaojun <damage3025@gmail.com> - 2013-05-30 09:14 +0800
  Re: How clean/elegant is Python's syntax? rusi <rustompmody@gmail.com> - 2013-05-29 19:49 -0700
    Re: How clean/elegant is Python's syntax? Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-30 12:36 -0600
      Re: How clean/elegant is Python's syntax? rusi <rustompmody@gmail.com> - 2013-05-30 11:47 -0700
      Re: How clean/elegant is Python's syntax? John Ladasky <john_ladasky@sbcglobal.net> - 2013-05-30 15:01 -0700
    Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-05-31 04:44 +1000
    Re: How clean/elegant is Python's syntax? Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-30 12:51 -0600
    Re: How clean/elegant is Python's syntax? MRAB <python@mrabarnett.plus.com> - 2013-05-30 20:38 +0100
    Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-05-31 07:28 +1000
    Re: How clean/elegant is Python's syntax? Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-31 09:43 -0600
    Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-06-01 04:52 +1000

csiph-web