I have a general question about this: if I understand correctly, your changes make it ...
13 years, 9 months ago
(2010-07-06 08:12:01 UTC)
#1
I have a general question about this: if I understand correctly, your changes
make it so that the ellipsis object just gets recognized in more places than it
did before. What did Cython previously let you do with ellipsis objects? For
that matter, what does *Python* do with ellipsis objects? (I guess I don't know
why they're there in the first place.)
If there are other things that Cython has previously allowed with Ellipis
objects, you should add some tests to ellipsis_T488.pyx to test those, too. In
particular, you should make sure that we still recognize an ellipsis everywhere
we previously did.
I think the changes to the code look good, unless I'm misunderstanding what all
an ellipsis can get used for -- once I know that, I can say something more
constructive about the code itself. :)
On 2010/07/06 08:12:01, craigcitro wrote: > I have a general question about this: if I ...
13 years, 8 months ago
(2010-07-07 03:22:44 UTC)
#2
On 2010/07/06 08:12:01, craigcitro wrote:
> I have a general question about this: if I understand correctly, your changes
> make it so that the ellipsis object just gets recognized in more places than
it
> did before. What did Cython previously let you do with ellipsis objects? For
> that matter, what does *Python* do with ellipsis objects? (I guess I don't
know
> why they're there in the first place.)
>
Quote from "What's New in Python 3.0": "The ellipsis (...) can be used as an
atomic expression anywhere."
(http://docs.python.org/release/3.0.1/whatsnew/3.0.html)
So what we did here is just to make Cython compatible with Python 3. Though,
indeed the ellipsis seems only useful in slicing, and NumPy uses it:
http://www.scipy.org/Tentative_NumPy_Tutorial#line-487
> If there are other things that Cython has previously allowed with Ellipis
> objects, you should add some tests to ellipsis_T488.pyx to test those, too.
In
> particular, you should make sure that we still recognize an ellipsis
everywhere
> we previously did.
>
There is already a test case (slice3.pyx) to test using ellipsis inside slicing.
So there might no need to add it to ellipsis_T488.pyx again?
> I think the changes to the code look good, unless I'm misunderstanding what
all
> an ellipsis can get used for -- once I know that, I can say something more
> constructive about the code itself. :)
> Quote from "What's New in Python 3.0": "The ellipsis (...) can be used as ...
13 years, 7 months ago
(2010-08-18 08:05:43 UTC)
#3
> Quote from "What's New in Python 3.0": "The ellipsis (...) can be used as an
> atomic expression anywhere."
> (http://docs.python.org/release/3.0.1/whatsnew/3.0.html)
>
Yep, this is exactly what I was looking for.
LGTM
Issue 1582041: T488 - Py3 syntax: Ellipsis ('...')
Created 13 years, 9 months ago by Haoyu Bai
Modified 13 years, 7 months ago
Reviewers: craigcitro
Base URL:
Comments: 0