Skip to content

Instantly share code, notes, and snippets.

View HaitaiNg's full-sized avatar

Haitai Ng HaitaiNg

View GitHub Profile
@rmela
rmela / 00_named_tuple_merge.py
Last active April 26, 2021 09:25
merge python named tuples
#
# I was given about 10 minutes to figure out an exercise that
# boiled down to merging named tuples
#
# Weird thing to expect someone to know. Certainly anyone who knows this
# off the top of their head knows a lot about Python. But not everyone
# good developer will know this little corner of Python.
#
# It took me some time inspecting tuples to come up with this approach, slowed
# by my discomfort with relying on single-underscore members of library objects