Le mardi 29 novembre 2016 17:42:51 UTC+1, Peleg Michaeli a écrit :
>
> Dear list members,
>
> I was wondering what really makes the difference between the graph
> generators in `basic.py` and those in `families.py`.
>
When we created the directory `generators` to split a big file with plenty
Minor note, Cython code will still use xrange, but it can (often?) optimize
calls to range.
Best,
Travis
On Wednesday, December 7, 2016 at 5:00:56 AM UTC-6, Thierry
(sage-googlesucks@xxx) wrote:
>
> On Wed, Dec 07, 2016 at 01:05:47AM -0800, Peleg Michaeli wrote:
> > I can wrap it with list
On Wed, Dec 07, 2016 at 01:05:47AM -0800, Peleg Michaeli wrote:
> I can wrap it with list indeed. I know that six.moves.range is an iterator
> - in Python 2, it is simply xrange. But I was thinking that perhaps Graph's
> constructor should be able to understand xrange (or rather, iterators in
>
It would be great to let Graph accept iterators. You are most welcome to work
on this.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I can wrap it with list indeed. I know that six.moves.range is an iterator
- in Python 2, it is simply xrange. But I was thinking that perhaps Graph's
constructor should be able to understand xrange (or rather, iterators in
general) instead of lists when the data is a dictionary of neighbours.
Frédéric, Peleg is a new contributor to Sage that we met in recent Sage
Days 79. I am sure he can understand the general move toward Python 3 if we
are pedagogical. So thanks for your second reply that appeared while I am
writting this.
I know that you have been working hard on the -> Python
The new (python3 or six) range is an iterator. You just have to wrap it
with list( ) to get back to the python2 behaviour if needed.
Le mardi 6 décembre 2016 17:31:20 UTC+1, Frédéric Chapoton a écrit :
>
> DO NOT TOUCH the import of range from six.moves ! This is part of our
> general move
DO NOT TOUCH the import of range from six.moves ! This is part of our
general move toward python3 !
And do never use xrange, this is now forbidden.
Frederic
Le mardi 6 décembre 2016 16:26:12 UTC+1, Peleg Michaeli a écrit :
>
> I actually think that this is an unwanted behaviour of `six`.
>
>
I actually think that this is an unwanted behaviour of `six`.
Anyway, we may let `Graph` handle xrange lists of neighbours if we want to
keep it that way.
On Tuesday, 6 December 2016 17:18:29 UTC+2, Peleg Michaeli wrote:
>
> I have tried to move LollipopGraph into families, but there was a
I have tried to move LollipopGraph into families, but there was a problem.
In families, there's the following import:
from six.moves import range
This overrides Python's range. I don't know why. The original
implementation of Lollipop graph uses Python's range, and when it tries to
use
On Tuesday, November 29, 2016 at 4:42:51 PM UTC, Peleg Michaeli wrote:
>
> Dear list members,
>
> I was wondering what really makes the difference between the graph
> generators in `basic.py` and those in `families.py`.
>
> For one concrete example, I was wondering why `LollipopGraph` appears
11 matches
Mail list logo