[Python-3000] Set literal

Raymond Hettinger python at rcn.com
Sat Jan 26 23:01:06 CET 2008


[GvR]
> Raymond, I think you're overestimating how often the repr() of a set
> actually gets eval()'ed. 

The repr is the model for how we enter things by hand.
If the repr is set([1,2,3]), the that's how we will learn
to type them into our programs.  It's not the eval(repr(s))
round trip that's at issue, it is a question of the preferred
way to write code.


> From an understandability POV, set({...}) is simpler than set([...])

I'm at a loss for words to explain the reasons for my strong
aversion to the syntax.  All I can say is that I think it's a mistake
and hope you let me switch back to the Py2.6 way.


Raymond


More information about the Python-3000 mailing list