[Python-ideas] Backward-incompatible changes for Python 4
Paul Moore
p.f.moore at gmail.com
Mon Apr 1 11:03:01 EDT 2019
On Mon, 1 Apr 2019 at 15:59, Todd <toddrjen at gmail.com> wrote:
> Currently there is no empty set literal. This is a hold-over from when there were no sets. Now would be a good opportunity to add one. I suggest {} become an empty set and {:} be an empty dict.
There should be no need for two styles - now that Python has type
inference, it should be possible for users to just type {} and have
the interpreter work out which was intended from context. Any
ambiguity can easily be resolved by using a type hint.
Paul
More information about the Python-ideas
mailing list