Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

Steve D'Aprano steve+python at pearwood.info
Sun Sep 17 04:14:37 EDT 2017


On Sun, 17 Sep 2017 04:16 pm, Terry Reedy wrote:

> On 9/17/2017 2:04 AM, Chris Angelico wrote:
>> On Sun, Sep 17, 2017 at 4:00 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>>> The numerical extensions have been quasi-official in the sense that at least
>>> 3 language enhancements have been make for their use.
>> 
>> I know about the matrix multiplication operator. What are the other
>> two (or more)?
> 
> Stride slicing, which later became valid in regular code, and Ellipsis.
> (I could be wrong on the latter.)


Nope, both are correct.

Slice strides were first supported in Python 1.4, but used exclusively by
Numerical Python (numpy's ancient predecessor), and didn't finally get
supported by Python builtins until as late as version 2.3!

https://docs.python.org/2.3/whatsnew/section-slices.html

Ellipsis was used for multi-dimensional slicing, and was added for Numerical
Python. It wasn't until recently (Python 3.4 perhaps?) that it finally became
legal to write '...' instead of 'Ellipsis' outside of slice notation.

Here's Peter Otten talking about it way back in 2004:

http://grokbase.com/t/python/python-list/042jd5y60n/ellipsis-usage




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list