HackerTrans
TopNewTrendsCommentsPastAskShowJobs

abcxjeb284

no profile record

comments

abcxjeb284
·vor 5 Jahren·discuss
This one is based in security standards :( https://security.stackexchange.com/questions/45455/which-sec... (link talks about screen locking but similar vibe for app logout for various certification bodies)
abcxjeb284
·vor 5 Jahren·discuss
It’s really 2 ways to do it, and the defaultdict way (I believe) would have less allocations in a deeply nested loop (since this version has to create a {} and a [] every time).

Also setdefault causes confusion for less experienced users in a way that the defaultdict format does not.
abcxjeb284
·vor 5 Jahren·discuss
Nice! Very expressive way to do n-levels!
abcxjeb284
·vor 5 Jahren·discuss
Great for expressivity of multi-level dicts (excuse the goofy example):

    state2name2visited = defaultdict(lambda: defaultdict(list))
     state2name2visited[“PA”][“Joe].append(“Pittsburgh”)
abcxjeb284
·vor 5 Jahren·discuss
Great links in the article to read more, but strikes me that this style of working assumes everyone is already up to speed. How do you set aside time for mentoring? Teaching? Growth?
abcxjeb284
·vor 5 Jahren·discuss
In hindsight, probably would’ve been way better to ship a `cryptography2` package and deprecate the old package.

That way you get the benefits of using rust without the anger about the sudden breakage of a transitive dependency.

In terms of floating versioning, I honestly think it’s not reasonable to ask packages to do this, because then you get into dependency hell with unfixable dependency conflicts.