Two dictionaries with equal keys and values are considered equal in Python, even if the order of the entries differ. By contrast, two OrderedDict objects are only equal if their respective entries are equal and if their order does not differ.
It may be more explicit: OrderedDict has move_to_end() which may be useful e.g., for implementing lru_cache-like functionality (like deque.rotate but with arbitrary keys).
OTOH that’s a lot less useful now that functools.lru_cache exists: it’s more specialised so it’s lighter, more efficient, and thread-safe. So unless you have extended flexibility requirements around your LRU, OD loses a lot there.
And if you’re using a FIFO cache, threading a regular dict through a separate fifo (whether linked list or deque) is more efficient in my experience of implementing both S3 and Sieve.
Also, dicts can become unordered at any time in the future. Right now the OrderedDict implementation is a thin layer over dict, but there are no guarantees it’ll always be that.
dict are ordered to keep argument order when using named arguments in function calling. So it would be a non-trivial breaking change to revert this now.
I would argue that OrderedDict have more chances to be depreciated than dict becoming unordered again, since there is now little value to keep OrderedDict around now (and the methods currently specific to UnorderedDict could be added to dict).
I guess for most purposes, OrderedDicts are then obsolete, but I believe there are some extra convenience methods that they have, but I've only really needed to preserve order.
Makes you think what other parts of Python have become obsolete.
It worked as an accidental implementation detail in CPython from some other optimization, but it wasn't intentional at the time. Because it wasn't intentional and wasn't part of the spec, that code could be incompatible with other interpreters like pypy or jython.
The reason Guido didn't want 3.6 to guarantee dict ordering was to protect 3.5 projects from mysteriously failing when using code that implicitly relied on 3.6 behaviors (for example, cutting and pasting a snippet from StackOverflow).
He thought that one cycle of "no ordering assumptions" would give a smoother transition. All 3.6 implementations would have dict ordering, but it was safer to not have people rely on it right away.
As someone who just had to backport a fairly large script to support 3.6, I found myself surprised at how much had changed. Dataclasses? Nope. `__future__.annotations`? Nope. `namedtuple.defaults`? Nope.
It's also been frustrating with the lack of tooling support. I mean, I get it – it's hideously EOL'd – but I can't use Poetry, uv, pytest... at least it still has type hints.
Yes, locking people into buildings (which is what you are doing if you need a key to get out, whether it's an RFID badge or a skeleton key) has been illegal since the Triangle Shirtwaist Factory Fire
As I mentioned in a sibling comment, you don't lock them in, you just set off major alarms and send an armed response if the door ever opens without badge activation. This presupposes some things about the facility and the facility operator, though.
Google has been blocked in all of China for many years. They mainly use AOSP (Android Open Source Project) and variants without any proprietary Google. Their IOS devices connect to servers in and run by China. Russia can do something similar, but they are giving people some warning and time to migrate. Russia has banned IOS for most government employees after the Operation Triangulation fiasco.
As sibling commenter says, the China model is probably ideal for dictators. In China WeChat is used for everything: communicating, social media, payment (along with AliPay). And it doesn't take much imagination how effective that is for surveillance and control. They already delete posts that are "dangerous to the harmonious living" (i.e. things that are against the government narrative), and if you're afraid you'll get banned and lose your means of contact with friends (as well as a payment app needed for day to day living), you'd probably censor yourself.
And monitoring payments is another method of surveillance, along with the monitoring of communications (even with E2E encryption, just knowing which people are talking to each other, and with what sort of intensity, is useful for surveillance).
And Elon Musk wants to make a similar universal app out of the corpse of Twitter... ha, wouldn't we all like that. Ironically all the people who still defend him overlap with the ones who are yelling "The woke lefties want to control our speech!"
I think Twitter is down 60% in advertisers and 30% in users? Elon personality is part of it, but losing so many people handling community, clients, institutions… I am sure the company has lost most of its institutional knowledge.
In my experience, it rarely really matters fine control. If the effort is too big to tweak the templates/markdown you export it to an intermediate state (LaTeX/Office/whatever) and drop the original markdown source.
This seems to be more about certain devices (consumer-grade GPUs) in certain settings (data centers), though I do question how enforceable it actually is. My guess is that it can only apply when you try to get discounts from bulk-ordering GPUs.
Also, was there any followup to this story? It seems a bit unnecessary because nVidia has already neutered consumer cards for many/most data center purposes by not using ECC and by providing so few FP64 units that double precision FLOPS is barely better than CPU SIMD.
it’s also not really a thing anymore because of the open kernel driver… at that point it’s just MIT licensed.
of course people continued to melt down about that for some reason too, in the customary “nothing is ever libre enough!” circular firing squad. Just like streamline etc.
There’s a really shitty strain of fanboy thought that wants libre software to be actively worsened (even stonewalled by the kernel team if necessary) so that they can continue to argue against nvidia as a bad actor that doesn’t play nicely with open source. You saw it with all these things but especially with the open kernel driver, people were really happy it didn’t get upstreamed. Shitty behavior all around.
You see it every time someone quotes Linus Torvalds on the issue. Some slight from 2006 is more important than users having good, open drivers upstreamed. Some petty brand preferences are legitimately far important than working with and bringing that vendor into the fold long-term, for a large number of people. Most of whom don’t even consider themselves fanboys! They just say all the things a fanboy would say, and act all the ways a fanboy would act…
The barcode is just another field in there, so it can be updated the same as anything. Passkit is very simple. For the barcode part you just tell it type of code (from the available types) and value to encode.
That’s the US perspective. But globally the final of the World Cup (which Messi played) was seen by more than 1.5B people (compared to <200M in the Super Bowl). It is a big name.
No, it's not. Did you really think baseball was the most popular sport in America? I was talking about where I live (Taiwan).
Also, it's a safe bet that more than 1.5 billion people just between India and China have heard of Zuck given how often he's been front page media in both countries.