length of a tuple or a list containing only one element

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Nov 3 13:24:30 EST 2008


Arnaud Delobelle:

>And introduces some new inconsistencies for newcomers, e.g.
> s = {1, 2, 3} # A set with 3 elements
> s = {1} # A set with one element
> s = {} # Surely, this should be an empty set!!

Are you able to list other inconsistencies?

Python3 introduces one or two warts, but removes many more
inconsistencies, so for me it's a net gain.

So far for me, beside the one you have shown, there's only another
detail I don't like of Python3 (the removal of tuple unpaking in
function calls).

Bye,
bearophile



More information about the Python-list mailing list