3 ms·
It's interesting + quite nice implementation. I've been using python for 10 years, and vaguely knew namedtuple used exec, but never knew there was a _source at
by stuaxo 9y ago
It's interesting + quite nice implementation. I've been using python for 10 years, and vaguely knew namedtuple used exec, but never knew there was a _source attribute.
I'm definitely looking forward to faster startup though.
I also didn't realise you can't pickle namedtuple by default, which probably cost me a few days on a project, don't think I tracked this down as the reason, but it makes sense now.