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


Groups > comp.lang.python > #86612

Re: Python Worst Practices

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.065
X-Spam-Evidence '*H*': 0.88; '*S*': 0.01; 'subject:Python': 0.06; 'builtin': 0.09; 'dan': 0.09; 'dict': 0.16; 'keys.': 0.16; 'once.': 0.16; 'wrote:': 0.18; 'feb': 0.22; "i've": 0.25; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; '2015': 0.84; 'case?': 0.84; 'ever.': 0.84; 'subject:Practices': 0.84
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=wsFJsRTlSSZYQhXfw04ck1zdXSHCn4HErLnVXK/H7UE=; b=ZXCq6UiBZY6i7jIhmsonefAd8w//DhnJzKm2IgTwo/QTHmusZjyzt9jL8sjGyZ4vg0 ICBu4E+QDqdBv6/2lLHXZG8EmWLuPtsnGTuNn/TXxVNKlli8tnVs5x749OtExkt87fr0 mJrM8BmJ0ag0tCbk5Es34Ph/ew/U527Q0IiQCNrNuyngiSHjkKzpX3P5J/yE4sVUENo3 GNqGbHx6J/zQ1xoC+AY6o4c0Y6g3BeFDb2T3R+xuK4COZhKdMbxeNdUt4BdnkCyHPwZ9 f1BCNn5BMXK43SMkumuEHhnwNQWhZNdQI93EtrWrAnikUYbVzfB2IegGjyjr18yXQ+jU L51A==
X-Received by 10.68.245.196 with SMTP id xq4mr31122254pbc.124.1425113365011; Sat, 28 Feb 2015 00:49:25 -0800 (PST)
MIME-Version 1.0
In-Reply-To <mcrgvg$fjl$1@dont-email.me>
References <mclca6$iie$1@ger.gmane.org> <mailman.19318.1425072098.18130.python-list@python.org> <54f1154c$0$12985$c3e8da3$5496439d@news.astraweb.com> <mcrgvg$fjl$1@dont-email.me>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sat, 28 Feb 2015 01:48:44 -0700
Subject Re: Python Worst Practices
To Python <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 <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.19330.1425113374.18130.python-list@python.org> (permalink)
Lines 6
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1425113374 news.xs4all.nl 2970 [2001:888:2000:d::a6]:40172
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:86612

Show key headers only | View raw


On Fri, Feb 27, 2015 at 9:42 PM, Dan Sommers <dan@tombstonezero.net> wrote:
> I don't think I've ever used the builtin function id in a program.
> Ever.  Not even once.  Honestly, what is a valid use case?

If you have a dict that you want to key on object identity rather than
equality, then you can use object ids as the keys.

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