3 ms·
The OP didn't say it was the same. It said they were similar. And they certainly are. Although, there may be performance differences between `namedtuple` and `
by burntsushi 13y ago
The OP didn't say it was the same. It said they were similar. And they certainly are.
Although, there may be performance differences between `namedtuple` and `__slots__`. Particularly access time. This SO post elaborates.[1]
[1] - http://stackoverflow.com/questions/2646157/what-is-the-fastest-to-access-struct-like-object-in-python http://stackoverflow.com/questions/2646157/what-is-the-faste...