mindly.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mindly.Social is an English speaking, friendly Mastodon instance created for people who want to use their brains and their hearts to make social networking more social. 🧠💖

Administered by:

Server stats:

1.2K
active users

#mutable

0 posts0 participants0 posts today
Stooryduster<p>For every <a href="https://mastodon.scot/tags/librarian" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>librarian</span></a> in the world. <br>And F*k <a href="https://mastodon.scot/tags/digital" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>digital</span></a> <a href="https://mastodon.scot/tags/media" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>media</span></a> for it is <a href="https://mastodon.scot/tags/ephemeral" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ephemeral</span></a> and now easily <a href="https://mastodon.scot/tags/mutable" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mutable</span></a>.</p>
C.<p><span class="h-card" translate="no"><a href="https://infosec.exchange/@phurd" class="u-url mention">@<span>phurd</span></a></span> </p><p>This is a take! More often people complain about how hard it is to achieve true immutability in Python.</p><p>list(tuple_instance) to the rescue, I guess :)</p><p><a href="https://mindly.social/tags/data" class="mention hashtag" rel="tag">#<span>data</span></a> <a href="https://mindly.social/tags/mutable" class="mention hashtag" rel="tag">#<span>mutable</span></a> <a href="https://mindly.social/tags/immutable" class="mention hashtag" rel="tag">#<span>immutable</span></a></p>
C.<p><span class="h-card" translate="no"><a href="https://oceanplayground.social/@matt" class="u-url mention">@<span>matt</span></a></span> </p><p>This does bite people in Python, as it applies to lists and dicts in addition to Pandas or whatever that is.</p><p>list and dict have copy() methods, but they&#39;re shallow copies. If you have mutable objects in your list or dict, those can be changed by someone with a copy...</p><p>Use copy.deepcopy() to ensure you get a mutable object that no one else (barring evil intent...) has a handle to fiddle with its contents.</p><p><a href="https://mindly.social/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://mindly.social/tags/mutable" class="mention hashtag" rel="tag">#<span>mutable</span></a> <a href="https://mindly.social/tags/DeepCopy" class="mention hashtag" rel="tag">#<span>DeepCopy</span></a></p>