Closed 4a781b2b-eada-4ae4-9b46-f6cbb63459b9 closed 5 years ago
Description changed:
---
+++
@@ -1,4 +1,4 @@
Fix database.oeis module for python3 :
- Remove an useless test
-- Replace `__getslice__` method with __getitem__.
+- Replace `__getslice__` method with `__getitem__` for `FancyTuple` object.
`__getslice__` is deprecated since python 2.6 and removed in python 3.x
Branch: u/vklein/develop
Commit: ad8e0b8
Branch pushed to git repo; I updated commit sha1. New commits:
ad8e0b8 | Trac #26704: Define `__getslice__` for python2 |
Changed commit from ad8e0b8
to none
Changed branch from u/vklein/develop to none
Description changed:
---
+++
@@ -1,4 +1,6 @@
Fix database.oeis module for python3 :
-- Remove an useless test
-- Replace `__getslice__` method with `__getitem__` for `FancyTuple` object.
+- Remove a useless test
+- Define `__getitem__` method with for `FancyTuple` object. It replace `__getslice__` method in python3.
+As `__getslice__` is still defined in tuple in python 2.7 we still need a `__getslice__` method in `FancyTuple` to override it.
+
`__getslice__` is deprecated since python 2.6 and removed in python 3.x
Branch: u/vklein/26704
Commit: ad8e0b8
Please add documentation and doctests to the new __getitem__
method.
It would be the same doctests as those of __getslice__
.
What do you think is the most appropriate ? :
either duplicate the doc or add a doctest for when the argument is not a slice but just one element
Replying to @fchapoton:
either duplicate the doc or add a doctest for when the argument is not a slice but just one element
I ve done the second one.
manque une ligne vide en dessous de TESTS::
Branch pushed to git repo; I updated commit sha1. New commits:
af1e030 | Trac #26704: Add a mising Blankline after TESTS::. |
Replying to @fchapoton:
manque une ligne vide en dessous de TESTS::
My bad.
And my newest tests won't work in py2 as sage: ft[0]
return '\xc3\xa9'
.
Branch pushed to git repo; I updated commit sha1. New commits:
7d03e29 | Trac #26704: Fix `__getitem__` doctests for python2 |
Changed keywords from none to thursdaysbdx
Fixed
Reviewer: Frédéric Chapoton
ok, thanks
Changed branch from u/vklein/26704 to 7d03e29
Fix database.oeis module for python3 :
__getitem__
method with forFancyTuple
object. It replace__getslice__
method in python3. As__getslice__
is still defined in tuple in python 2.7 we still need a__getslice__
method inFancyTuple
to override it.__getslice__
is deprecated since python 2.6 and removed in python 3.xComponent: python3
Keywords: thursdaysbdx
Author: Vincent Klein
Branch/Commit:
7d03e29
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/26704