Suppose I have namedtuple like
>>> Point = namedtuple('Point','x y')
Why am I creating one object through
>>> Point(3,4)
but when I want to apply Point through the map, I need to call
>>> map(Point._make,[(3,4),(5,6)])
I suspect that this has something to do with classmethods, perhaps, and I hope that by understanding this, I will learn more about them. Thanks in advance.
source
share