3 ms·
Till now I had never seen Ellipsis. It seems very similar to slice notation [:]. Found an StackOverflow comment [1] that has more details about usage of Ellipsi
by ajitk 14y ago
Till now I had never seen Ellipsis. It seems very similar to slice notation [:]. Found an StackOverflow comment [1] that has more details about usage of Ellipsis in slicing higher dimensional array numpy.
[1] http://stackoverflow.com/questions/118370/how-do-you-use-the-ellipsis-slicing-syntax-in-python http://stackoverflow.com/questions/118370/how-do-you-use-the...
- grifaton 14y agoHere's a rare example of obfuscated python, deceptively called "Python's Ellipsis Explained": http://blog.brush.co.nz/2009/05/ellipsis/ http://blog.brush.co.nz/2009/05/ellipsis/
- DasIch 14y agoThe only way in which Ellipsis can be useful is to save one character by using it instead of pass in Python3, like: def foo(): ... It is really highly unusual and I wouldn't recommend the practice shown in the blog post at all as this is not a common pattern.