Re:What's Going On (on "Why Python, Ruby, and Javascript are...
by YesThatTom2 on Sunday April 14, 2013 @02:18AM
(#5546096)
Wouldn't adding goland-style slices to Python be awesome?
[ Parent
| on HN ]
Re:What's Going On (on "Why Python, Ruby, and Javascript are...
by almost on Sunday April 14, 2013 @05:32AM
(#5546446)
It's not quite the same but some of the use cases (and a bunch of other stuff) would be covered by numpy arrays. You can create multiple views on the same in memory data with different start and end points and different strides.
Re:What's Going On (on "Why Python, Ruby, and Javascript are...
by dagw on Sunday April 14, 2013 @06:21AM
(#5546534)
Agreed. I think numpy arrays a rather overlooked by most python programmers. They allow all kinds of useful tricks like that that are quite handy even if you're not doing strictly numeric work.
Re:What's Going On (on "Why Python, Ruby, and Javascript are...
by kkuduk on Sunday April 14, 2013 @05:21AM
(#5546416)
well, there are memoryviews, but they could have been designed better
Re:What's Going On (on "Why Python, Ruby, and Javascript are...
by travisoliphant on Sunday April 14, 2013 @10:08PM
(#5549346)
Memoryviews are the step-child of NumPy arrays. The buffer-protocol was the real intent and the memory view the forgotten "example" until a few brave and noble Python devs rescued it from obscurity. Memory-views are not that useful to one who will always have NumPy installed.