PEP218: Representing the empty set
Andrew McLean
spam-trap-095 at at-andros.demon.co.uk
Tue Feb 17 15:05:43 EST 2004
Looking at PEP218 there is a discussion about the most appropriate way
of representing the empty set. The two alternatives proposed are {} and
{-}. I was wondering why either of these is needed. Why not just use
set()?. It is only two more characters than {-} and a bit more explicit.
Similarly, I find myself initialising dictionaries with dict() rather
than {}.
Am I missing something?
--
Andrew McLean
More information about the Python-list
mailing list