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


Groups > comp.lang.python > #86608

Re: Python Worst Practices

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
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; 'languages,': 0.04; 'subject:Python': 0.06; 'python:': 0.09; "'as',": 0.16; "'for',": 0.16; "'if',": 0.16; "'in',": 0.16; "'is',": 0.16; "'not',": 0.16; "'or',": 0.16; "'with',": 0.16; '(just': 0.16; '-tkc': 0.16; 'beating': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'mainstream': 0.16; 'php:': 0.16; 'language': 0.16; 'wrote:': 0.18; "python's": 0.19; 'import': 0.22; 'header:In-Reply-To:1': 0.27; 'comparison': 0.31; 'constant': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'languages': 0.32; "can't": 0.35; 'keyword': 0.36; 'charset:us-ascii': 0.36; 'received:10': 0.37; 'requiring': 0.38; 'to:addr:python-list': 0.38; 'bad': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'most': 0.60; 'c++:': 0.84; 'subject:Practices': 0.84; 'visits': 0.84
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1425095344734:3494532787
X-MC-Ingress-Time 1425095344734
Date Fri, 27 Feb 2015 21:50:35 -0600
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: Python Worst Practices
In-Reply-To <54f1154c$0$12985$c3e8da3$5496439d@news.astraweb.com>
References <mclca6$iie$1@ger.gmane.org> <mailman.19318.1425072098.18130.python-list@python.org> <54f1154c$0$12985$c3e8da3$5496439d@news.astraweb.com>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AuthUser tim@thechases.com
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.19328.1425103867.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1425103867 news.xs4all.nl 2866 [2001:888:2000:d::a6]:51215
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3927
X-Received-Body-CRC 3636267640
Xref csiph.com comp.lang.python:86608

Show key headers only | View raw


On 2015-02-28 12:09, Steven D'Aprano wrote:
> > * Make your language have a lot of keywords. Enough to make
> > memorizing them ALL unlikely, requiring constant visits to your
> > documentation   
> 
> Is 33 a lot?
> 
> py> import keyword
> py> keyword.kwlist  
> ['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 
> 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally',
> 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda',
> 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while',
> 'with', 'yield']

A quick google-and-tally for languages and their corresponding
number of keywords:

C: 33
C#: 77
C++: 86
Java: 50
Lua: 21
PHP: 67
Pascal: 54
Perl: 40
Pike: 37 (Just for you, ChrisA)
Python: 31 (2.x) or 33 (3.x)
Ruby: 40

So I can't say that Python's all that bad in comparison to most other
mainstream languages, with only the austere Lua beating out Python.

-tkc

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


Thread

Re: Python Worst Practices Travis Griggs <travisgriggs@gmail.com> - 2015-02-27 13:21 -0800
  Re: Python Worst Practices Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-28 12:09 +1100
    Re: Python Worst Practices sohcahtoa82@gmail.com - 2015-02-27 17:32 -0800
      Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-02-28 12:44 +1100
        Re: Python Worst Practices Christian Gollwitzer <auriocus@gmx.de> - 2015-03-03 09:51 +0100
          Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-03-03 22:12 +1100
            Re: Python Worst Practices Christian Gollwitzer <auriocus@gmx.de> - 2015-03-03 23:46 +0100
              Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-03-04 10:12 +1100
                Re: Python Worst Practices Christian Gollwitzer <auriocus@gmx.de> - 2015-03-04 21:27 +0100
    Re: Python Worst Practices Dan Sommers <dan@tombstonezero.net> - 2015-02-28 04:42 +0000
      Re: Python Worst Practices Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-28 17:36 +1100
        Re: Python Worst Practices Dan Sommers <dan@tombstonezero.net> - 2015-02-28 07:50 +0000
          Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-02-28 19:55 +1100
        Re: Python Worst Practices Ethan Furman <ethan@stoneleaf.us> - 2015-02-27 23:51 -0800
          Re: Python Worst Practices Marko Rauhamaa <marko@pacujo.net> - 2015-02-28 10:50 +0200
      Re: Python Worst Practices Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-28 01:48 -0700
      Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-02-28 19:58 +1100
    Re: Python Worst Practices Tim Chase <python.list@tim.thechases.com> - 2015-02-27 21:50 -0600
      Re: Python Worst Practices Cousin Stanley <cousinstanley@gmail.com> - 2015-02-28 09:03 -0700
        Re: Python Worst Practices Rustom Mody <rustompmody@gmail.com> - 2015-02-28 08:16 -0800
        Re: Python Worst Practices MRAB <python@mrabarnett.plus.com> - 2015-02-28 17:56 +0000
        Re: Python Worst Practices Ethan Furman <ethan@stoneleaf.us> - 2015-02-28 10:13 -0800
        Re: Python Worst Practices Tim Chase <python.list@tim.thechases.com> - 2015-02-28 12:30 -0600
        Re: Python Worst Practices Tim Chase <python.list@tim.thechases.com> - 2015-02-28 12:39 -0600
    Re: Python Worst Practices BartC <bc@freeuk.com> - 2015-02-28 10:39 +0000
      Re: Python Worst Practices Chris Angelico <rosuav@gmail.com> - 2015-02-28 23:45 +1100
        Re: Python Worst Practices Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-01 13:29 +1300

csiph-web