@@ -790,7 +790,7 @@ cdef class Pygen(GiacMethods_base):
790
790
#NB: the != here gives problems with the __richcmp__ function
791
791
#if ( s!=None) :
792
792
# so it's better to use isinstance
793
- if ( isinstance( s,None. __class__)) :
793
+ if ( isinstance( s, None. __class__)) :
794
794
# Do NOT replace with: self=GIACNULL ( cf the doctest in __repr__
795
795
sig_on( )
796
796
self. gptr = new gen (( <Pygen>GIACNULL) . gptr[0 ])
@@ -959,13 +959,13 @@ cdef class Pygen(GiacMethods_base):
959
959
else:
960
960
raise IndexError( 'list index %s out of range'%( i))
961
961
else:
962
- if isinstance( i,slice) :
962
+ if isinstance( i, slice) :
963
963
sig_on( )
964
964
result = gen( _getgiacslice( self,i) ,<short int>self. _subtype)
965
965
sig_off( )
966
966
return _wrap_gen( result)
967
967
# add support for multi indexes
968
- elif isinstance( i,tuple) :
968
+ elif isinstance( i, tuple) :
969
969
if( len( i) ==2) :
970
970
return self[i[0 ]][i[1 ]]
971
971
elif( len( i) ==1) :
@@ -1526,7 +1526,7 @@ cdef class Pygen(GiacMethods_base):
1526
1526
sage: libgiac. integrate( cos( y) , y) . sage( )
1527
1527
sin( π)
1528
1528
"""
1529
- if isinstance( R,SR. __class__) :
1529
+ if isinstance( R, SR. __class__) :
1530
1530
# Try to convert some functions names to the symbolic ring
1531
1531
lsymbols = symbol_table['giac' ]. copy( )
1532
1532
#lsymbols. update( locals)
@@ -1594,7 +1594,7 @@ cdef class Pygen(GiacMethods_base):
1594
1594
sage: vector(v+ v/ 3 ,QQ)
1595
1595
(0 , 4 / 3 , 8 / 3 , 4 , 16 / 3 , 20 / 3 , 8 , 28 / 3 , 32 / 3 , 12 )
1596
1596
"""
1597
- if( isinstance(R, None.__class__) ):
1597
+ if isinstance(R, None.__class__):
1598
1598
R=ZZ
1599
1599
1600
1600
v = self.dim()
@@ -1780,9 +1780,9 @@ cdef vecteur _wrap_pylist(L) except +:
1780
1780
cdef vecteur * V
1781
1781
cdef int i
1782
1782
1783
- if isinstance(L, (tuple, list, range):
1784
- n= len(L)
1785
- V= new vecteur()
1783
+ if isinstance(L, (tuple, list, range)) :
1784
+ n = len(L)
1785
+ V = new vecteur()
1786
1786
1787
1787
sig_on()
1788
1788
for i in range(n):
0 commit comments