News for hackers. Stuff that matters.
Re:Show HN: Gelidum – My Python library to freeze objects by BerislavLopac on Tuesday June 15, 2021 @03:40AM (#27512401)
> lists aren’t immutable when passed to another function

Well, lists are never immutable in Python; you want to use tuples for that.

Re:Show HN: Gelidum – My Python library to freeze objects by macintux on Tuesday June 15, 2021 @06:13PM (#27522220)
True, what I really want is referential transparency, not immutability per se.

I’ve only used tuples in Python as a small data structure, will have to experiment with using them as a list substitute, thanks.

Re:Show HN: Gelidum – My Python library to freeze objects by BerislavLopac on Wednesday June 16, 2021 @07:52AM (#27527461)
Just keep in mind that a tuple's elements can still be mutable, so it's not a "frozen" data structure throughout.