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


Groups > comp.lang.python > #107751

Re: Pythonic style

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Christopher Reimer <christopher_reimer@icloud.com>
Newsgroups comp.lang.python
Subject Re: Pythonic style
Date Wed, 27 Apr 2016 21:00:44 -0700
Lines 12
Message-ID <mailman.169.1461816053.32212.python-list@python.org> (permalink)
References <5720357B.4060009@icloud.com> <CALwzidn0SN5yax3bfmTPDTxBvfr+bnVNzeUe3dZYrS9ji2WCtw@mail.gmail.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <85twimju18.fsf@benfinney.id.au> <57218AEC.6020302@icloud.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8BIT
X-Trace news.uni-berlin.de oyYPslb44ilCqet7D6GlZw9n+pmY515Vc9UJro9AwjYg==
Return-Path <christopher_reimer@icloud.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.030
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'attributes': 0.07; 'instance.': 0.09; 'python': 0.10; 'explicitly': 0.15; 'mapping,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'object.': 0.22; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'object,': 0.27; 'received:17': 0.27; 'received:10.0.0': 0.32; 'received:10.0': 0.34; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thank': 0.38; 'to:addr:python.org': 0.40; 'header:MIME-version:1': 0.60; 'more': 0.63; 'choose': 0.68; 'header:In-reply-to:1': 0.84
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2016-04-28_02:,, signatures=0
X-Proofpoint-Spam-Details rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1604280058
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
In-reply-to <85twimju18.fsf@benfinney.id.au>
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=4d515a; t=1461816044; bh=KcHTvqJuHDziSOmEJ4Vj10QhlDIeq9RSzuowFT30sr0=; h=MIME-version:Content-type:Subject:To:From:Message-id:Date; b=Z7LdiBQxsS35QIA92jMcht8Y4tzZozv7eeJUJUUF4AfJ7stQ8xTiLHgmSU1qagx4B ORf+y3I4brruQbOHIj4JCjsfmaOvwXsZ/Qj6rKRU0/nxccWIi4NUtsEy/WU7Cj2PiG YyBqJI313QrmZ4mgneA7SkOrM4v7vzJjQDY7rtIier4VK/oRP9d8caLNaZGJr/qn7X eoseabeTcnM+/GvYZPlHpBTpl6yWkWQUeyeHEJKz8uVSkDldp/HE4YIUHdCOipTb/W UscYOJ7Wifkvn/e12djumHVvXVockeHONoUd8NzqqS0VWbh5bQybny2FN70zT1TUMm DBk0hA87JvfLw==
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
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>
X-Mailman-Original-Message-ID <57218AEC.6020302@icloud.com>
X-Mailman-Original-References <5720357B.4060009@icloud.com> <CALwzidn0SN5yax3bfmTPDTxBvfr+bnVNzeUe3dZYrS9ji2WCtw@mail.gmail.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <85twimju18.fsf@benfinney.id.au>
Xref csiph.com comp.lang.python:107751

Show key headers only | View raw


On 4/27/2016 8:23 PM, Ben Finney wrote:
> If you want items in a mapping, explicitly use a Python ‘dict’ instance.
> If you want attributes that describe an object, explicitly use
> attributes of that object. Deliberately choose which one makes more
> sense.

Okay, that makes sense.

Thank you,

Chris R.

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


Thread

Re: Pythonic style Christopher Reimer <christopher_reimer@icloud.com> - 2016-04-27 21:00 -0700

csiph-web