Roy Smith wrote: > In article <[email protected]>, > Steven D'Aprano <[email protected]> wrote: > >> Chris Angelico wrote: >> >> > You should be able to use two semicolons, that's equivalent to one >> > colon right? >> > >> > ChrisA >> > (No, it isn't, so don't take this advice. Thanks.) >> >> >> Oooh! Python-ideas territory! >> >> I think the parser should allow two consecutive semi-colons, or four >> commas, as an alias for a colon. Then we could write code like: >> >> >> def spam(arg);; >> for x in seq,,,, >> pass > > Wouldn't it make more sense to use four periods? > > def spam(arg).... > for x in seq.... > pass > > First, 2 colons is 4 dots, so it's conservation of punctuation. Second, > it reads pretty well.
Four periods .... is already legal, it is ellipsis followed by dot: py> ....__class__ <class 'ellipsis'> (Try it in Python 3, it actually works!) -- Steven -- https://mail.python.org/mailman/listinfo/python-list
