Python Forum

Full Version: Guido van Rossum: BDFL Python 3 retrospective
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Quote:Guido: There's never been people who walked away and said we're only going to use python 2' ... 'Well maybe there was one guy'
wonder who that might be
I am trying to imagine what would be a programming language which keeps all old features to preserve the compatibility. And slowly in my head appears a picture of an animal that doesn't give up of any evolutionary peculiarity since the dawn of time. Brrrrr! Ugly and scary creature.
When did dictionaries preserve order?
Quote:When did dictionaries preserve order?
Python 3.6
good to know lol
3.6 was the biggest release in the Python 3 series with 16 new PEP(Python Enhancement Proposals) like eg f-string.
But as importation was the internal changes made in in 3.6.
Like a new dictionaries implementation similar to the PyPy dict implementation was done bye Raymond Hettinger.

This resulted in faster dictionaries and using 20% to 25% less memory when compared to Python 3.5.
Dictionaries is used a lot internally in Python so this will speed up Python in most areas.

That dictionaries was ordered was a implantation detail and not guaranteed.
Work for all i have tested,so people start to relay on it,so 3.7 i think it will be guaranteed.
Quote:Twitter @Raymond Hettinger
Having dicts ordered by default in #python 3.6 is not guaranteed yet.
But it is so convenient that a guarantee for 3.7 is almost inevitable.
I like David Beazley's take on this. He says (paraphrased)
'We're told not to rely on it. I say rely on it, then it has to become guaranteed'
(Feb-28-2018, 08:38 PM)Larz60+ Wrote: [ -> ]I like David Beazley's take on this.
They can always add collections.UnorderedDict later on...
(Feb-28-2018, 10:50 AM)Larz60+ Wrote: [ -> ]
Quote:When did dictionaries preserve order?
Python 3.6
it is not official until 3.7. this just turned out to happen in 3.6. i don't know if you're allowed to depend on it until 3.7, but i suspect a lot of people will. my maps in C preserved order and it was handy. i'll probably be among those depending on it in 3.6.
Pages: 1 2