On Mon, Oct 29, 2012 at 1:36 PM, Chris Angelico <ros...@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.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to