A
Andrew McLean
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?
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?