5 ms·
I vaguely recall seeing a mailing list thread where `{-}` was proposed. I think it was rejected based on parsing ambiguity, i.e. `{-1}` vs `{-}`. (Or it's possi
by johnsoft 14y ago
I vaguely recall seeing a mailing list thread where `{-}` was proposed. I think it was rejected based on parsing ambiguity, i.e. `{-1}` vs `{-}`. (Or it's possible I might be losing my memory)
- philipbjorge 14y agoI originally implemented it that way and had that exact same issue (it's one of the revisions on github). Similarly, {/} would also be a problem.
- digisign 14y agoHow about {,} or s{} ?
- philipbjorge 14y agoI didn't think to do {,} which I like. s{} looks weird to me, but I couldn't tell you why.
- digisign 14y agoThe s{} alternatve is based on the strange r'' or u'' syntax i've gotten used to.
- mkhattab 14y agoI think {,} is intuitive because it reminds me of syntax for one-element tuples, e.g. (1,) -- but it may make code harder to read, which is not Pythonic.
- yen223 14y agoWouldn't it lead to the same problem of a lack of consistency? dict: {} list: [] tuple: () set: {-}