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: 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: References: From: Ma Xiaojun Date: Thu, 30 May 2013 09:14:06 +0800 Subject: Re: How clean/elegant is Python's syntax? To: Python List 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Thu, May 30, 2013 at 8:24 AM, Dan Stromberg 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.