[BangPypers] Multiple return values from a function : Where to draw the line ?
Noufal Ibrahim KV
noufal at nibrahim.net.in
Fri May 23 10:04:48 CEST 2014
On Fri, May 23 2014, kracekumar ramaraju wrote:
> You can use namedtuple.
>
> from collections import namedtuple
> Person = namedtuple('Person', ['foo', 'bar', 'baz'])
> p = Person(foo='foo', bar='bar', baz='baz')
[...]
Much better although with namedtuple, the attributes are fixed aren't
they? I don't use collections as much as I should.
--
Cordially,
Noufal
http://nibrahim.net.in
More information about the BangPypers
mailing list