Time we switched to unicode? (was Explanation of this Python language feature?)

Antoon Pardon antoon.pardon at rece.vub.ac.be
Tue Mar 25 08:07:45 EDT 2014


On 25-03-14 12:12, Chris Angelico wrote:

> On Tue, Mar 25, 2014 at 9:24 PM, Antoon Pardon
> <antoon.pardon at rece.vub.ac.be> wrote:
>> No they didn't have to. With the transition to python3, the developers
>> could have opted for empty braces to mean an empty set. And if they
>> wanted a literal for an empty dictionary, they might have chosen {:}.
>> Backward-compatibility was already broken so that wasn't an argument.
> Python 3.0 didn't just say "to Hades with backward compatibility". The
> breakage was only in places where it was deemed worthwhile. Changing
> the meaning of {} would have only small benefit and would potentially
> break a LOT of programs, so the devs were right to not do it.

More programs than those who broke because print was now a function?
Do you think it would have been so problamatic that it couldn't have
been handled by '2to3'?

Maybe breaking backward-compatibility wasn't considered worthwhile,
but that is not the same as stating backward-compatibility was
necessary. And that is how I understood how you stated your claim. 

> Python 3 and Python 2 are not, contrary to some people's opinions,
> completely different languages.

And changing the meaning of {} to now indicate the emppty set, wouldn't
have turned it in a completely different language either.

-- 
Antoon Pardon.





More information about the Python-list mailing list