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?

References <CAGVx7UWXAFHSHq37Ep-Vk=cM2wYrEGHSUhNc8s43bCvj_VcVow@mail.gmail.com> <CAGGBd_oT=vqvPGZy+d1H=XHjdPCmYUxJMXAwii7WH845xrYybQ@mail.gmail.com>
From Ma Xiaojun <damage3025@gmail.com>
Date 2013-05-30 09:14 +0800
Subject Re: How clean/elegant is Python's syntax?
Newsgroups comp.lang.python
Message-ID <mailman.2389.1369876474.3114.python-list@python.org> (permalink)

Show all headers | 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