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


Groups > comp.lang.python > #8358

Re: Interpreting Left to right?

References <BANLkTimcPAjQP4JJk=OAbrkLFfd2AtndwQ@mail.gmail.com> <iu1aaq$rni$1@dough.gmane.org> <4E043953.5080705@stoneleaf.us>
Date 2011-06-24 17:46 +1000
Subject Re: Interpreting Left to right?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.358.1308901603.1164.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jun 24, 2011 at 5:14 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
> --> x = x['huh'] = {}
> --> x
> {'huh': {...}}
>

I would have to call that dodgy practice... unless you have a lot of
places where you need a dictionary with itself as an element, I would
avoid assignments that depend on each other.

Perhaps it's just because I'm a C programmer, but that code smells a
lot like the classic "i = i++;" blunder - nearly as bad as land wars
in Asia.

ChrisA

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


Thread

Re: Interpreting Left to right? Chris Angelico <rosuav@gmail.com> - 2011-06-24 17:46 +1000

csiph-web