Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32420 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2012-10-29 14:18 -0600 |
| Last post | 2012-10-29 14:18 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Immutability and Python Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-29 14:18 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2012-10-29 14:18 -0600 |
| Subject | Re: Immutability and Python |
| Message-ID | <mailman.3045.1351541921.27098.python-list@python.org> |
On Mon, Oct 29, 2012 at 1:36 PM, Chris Angelico <rosuav@gmail.com> wrote:
> Question: Is it clearer to take advantage of the fact that the base
> class can be an arbitrary expression?
>
> class MyImmutableClass(namedtuple('MyImmutableClass', 'field1 field2
> field3 field4')):
>
> You lose the unnecessary temporary and triplication of name, but gain
> instead a rather long line.
I think it's more readable if separated, but YMMV.
Back to top | Article view | comp.lang.python
csiph-web