Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63024
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'languages.': 0.04; 'syntax': 0.04; 'explicitly': 0.05; 'assignment': 0.07; 'literal': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; '(1,': 0.16; 'assignment?': 0.16; 'expression.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'notation': 0.16; 'personally,': 0.16; 'subtraction': 0.16; 'wrote:': 0.18; 'differ': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'nature': 0.30; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'equality': 0.31; 'fault': 0.31; 'steven': 0.31; 'symbolic': 0.31; 'though.': 0.31; 'fri,': 0.33; 'problem': 0.35; 'agree': 0.35; 'received:google.com': 0.35; 'similar': 0.36; 'too': 0.37; 'pm,': 0.38; 'easy': 0.60; 'most': 0.60; 'tell': 0.60; 'length': 0.61; 'visa': 0.61; 'more': 0.64; 'obvious': 0.74; 'difference.': 0.84; 'inherent': 0.84; 'favour': 0.91; 'mistakenly': 0.91; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=w7T1m+241s6SaSl6wPhMCUfyb7Fgpf1PSMD1eFPjJ1A=; b=UX5gR436P3y5tJs/ggB/e+ixHr5E5rIZjJjmcAURrbLdoBpHqDB2WGgi7CEu4K+FJZ pr8n+NmHEs5aCim+pYrRfKuBPcYxBcqW+xqGIMWy3Sk5mG+5xFHFZM2YCmV2fKMJAagt bXOoAfE3lx46qIpwXkN4OPflnRpB125TTXLxVlGBnPHxEaS/pDPUGsXhtArSTGUl5GyU IRRDcsNbYP990ZLR18HOPXTQbTCBSQC+zkLnp9sOHxKepxprhJNrKUZLREhvv6LXGJGu 2lvNdPIyragkR9Palh1sK8N3vc096x7MWv0tvEc/xpKRi3CYLR0fOi/rfYbAYA6ja9MV gAgQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.196.193 with SMTP id io1mr92646436pbc.46.1388721324431; Thu, 02 Jan 2014 19:55:24 -0800 (PST) |
| In-Reply-To | <52c62fa8$0$30001$c3e8da3$5496439d@news.astraweb.com> |
| References | <52C59FF6.5000607@allsup.co> <mailman.4816.1388709915.18130.python-list@python.org> <52c62fa8$0$30001$c3e8da3$5496439d@news.astraweb.com> |
| Date | Fri, 3 Jan 2014 14:55:24 +1100 |
| Subject | Re: Ifs and assignments |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <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.4824.1388721334.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1388721334 news.xs4all.nl 2893 [2001:888:2000:d::a6]:48568 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:63024 |
Show key headers only | View raw
On Fri, Jan 3, 2014 at 2:33 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> Personally, I find it hard to care about assignment as an expression. I find
> the obvious C-inspired syntax terrible, as it is too easy to mistakenly use
> == instead of = or visa versa:
Python has similar problems, though. It's inherent to the nature of
symbolic languages.
a = (1, 2, 3)
b = {1, 2, 3}
In many fonts, it's hard to tell one from the other without peering.
Do people decry set literal notation in favour of explicitly writing
the word "set"? No; and I think most of us agree that it's better to
have the symbols. At least with == vs = there's a length difference. I
don't think it's C's fault or problem that equality and assignment
look similar and can be used in the same places, any more than it's a
problem to have assignment and subtraction differ by only one stroke:
a - (1, 2, 3)
Is that confusingly similar to assignment?
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Ifs and assignments Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-02 19:45 -0500
Re: Ifs and assignments Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-03 14:33 +1100
Re: Ifs and assignments Chris Angelico <rosuav@gmail.com> - 2014-01-03 14:49 +1100
Re: Ifs and assignments Roy Smith <roy@panix.com> - 2014-01-02 23:14 -0500
Re: Ifs and assignments Chris Angelico <rosuav@gmail.com> - 2014-01-03 15:25 +1100
Re: Ifs and assignments Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-03 04:29 +0000
Re: Ifs and assignments Duncan Booth <duncan.booth@invalid.invalid> - 2014-01-03 15:46 +0000
Re: Ifs and assignments Chris Angelico <rosuav@gmail.com> - 2014-01-03 14:55 +1100
Re: Ifs and assignments Roy Smith <roy@panix.com> - 2014-01-02 23:00 -0500
Re: Ifs and assignments Chris Angelico <rosuav@gmail.com> - 2014-01-03 15:08 +1100
csiph-web