Just trace back the dict to it's origin, through all the places it can be modified, and you know what is (or could be) inside...
/s
151 karma · joined November 30, 2022
Just trace back the dict to it's origin, through all the places it can be modified, and you know what is (or could be) inside...
/s
I think the first one should be very much doable, but I am not sure how I would build the "almost complete" and the "similar colors" features.
I was just trying to get a better understanding of what is happening under the hood :)
Is my understanding correct, that this means you propagate writes asynchronously from the primary to the secondary servers (without waiting for an "ACK" from them for writes)?
Whether it makes sense to use that is a different question, but it is possible :)
See https://docs.python.org/3/library/typing.html#typing.runtime...
Also this:
"Because Animal is a Protocol, any class that defines feed() becomes an Animal"
is slightly incorrect.
By default, protocols are only relevant for static type analysis, but you _can_ enable runtime instance checking using the @runtime_checkable decorator.
(So you can do "if isinstance(foo, Animal):...", but AFAIK this decorator comes with a performance penalty)
To my eyes, the problem of choosing useful defaults for complicated types/datastructures is independent of whether I add type hints for them.
I think I am missing something...
As a (former) NetEng, it bothers me to no end that so many people claim "it's the network" when their application is slow / broken, without understanding the actual problem.
I often use generator expressions for the intermediate values (so I don't allocate a new list for each step), but I find this to be much more readable.
if key not in table:
return default_value
value = table[key]
I think this could/should be shortened to value = table.get(key, default_value)
...
return value
No?In case you disagree, I'd be happy to hear your thoughts!
"Ignore fields coming from the API if you don’t need them. Keep only those that you use."
IMO this addresses only one part of the problem, namely "sanitize your inputs". But if you follow this, and therefore end up with a dict whose keys are known and always the same, using something "struct-like" (dataclasses, attrs, pydantic, ...) is just SO much more ergonomic :)
No, it's not. NAT only translates addresses and does not inspect the TCP "internals" (like sequence number etc, which would allow it to block certain packets).
What you are describing is a stateful firewall that allows "reply packets" for an established TCP-session.
Probably just a matter of taste, but I think having the files for different environments "side by side" makes it actually easier to compare them if needed, and you still have the full commit history for tracking changes to each environment.
The concepts of "national" and "international" don't map very well to the internet.
Many companies run multiple ASes, and many companies are peering at IXPs all over the world...
a.k.a RPKI
> ping across a Starlink connection from the customer side terminal to the first IP end point behind the Starlink earth station
Pretty sure that is the reason why he used
> ping across a Starlink connection from the customer side terminal to the first IP end point behind the Starlink earth station
instead of pinging the terminal itself.
(ICMP packets passing _through_ a router are handled just like any other traffic and are therefore OK for an analysis like this)
This might or might not be what you want/expect...
I see what you did there :)
But then you have the problem: Who manages your community controlled domains? Who keeps track of who owns which domain?
Any thoughts on that approach?