Re:Best Practices for Using Functional Programming in Python
by sevensor on Wednesday December 05, 2018 @10:38AM
(#18609163)
Python offers immutable data structures in addition to the mutable ones. Tuples are immutable, we've had namedtuple for a while, and now it's possible to write immutable data classes as well. As time goes by, I find myself using less and less mutability in Python. At this point I default to immutable structures, and I bring in mutable ones only if I need them for performance or there's no reasonable immutable alternative.
[ Parent
| on HN ]
Re:Best Practices for Using Functional Programming in Python
by macintux on Wednesday December 05, 2018 @10:56AM
(#18609371)
Tangentially, I was extremely annoyed to discover that tuple unpacking in function headers was removed with Python 3. Coming from Erlang, tuples were quite appealing, but that was frustrating.