@@ -84,25 +84,25 @@ cdef class fmpq(flint_scalar):
84
84
p = fmpz(p)
85
85
q = fmpz(1 )
86
86
else :
87
- p = any_as_fmpq(p)
88
- if p is NotImplemented :
87
+ p2 = any_as_fmpq(p)
88
+ if p2 is NotImplemented :
89
89
raise TypeError (" cannot create fmpq from object of type %s " % type (p))
90
- fmpq_set(self .val, (< fmpq> p ).val)
90
+ fmpq_set(self .val, (< fmpq> p2 ).val)
91
91
return
92
92
else :
93
93
raise TypeError (" fmpq() takes at most 2 arguments (%d given)" % len (args))
94
94
95
- p = any_as_fmpz(p)
96
- if p is NotImplemented :
95
+ p2 = any_as_fmpz(p)
96
+ if p2 is NotImplemented :
97
97
raise TypeError (" cannot create fmpq from object of type %s " % type (p))
98
- q = any_as_fmpz(q)
99
- if q is NotImplemented :
98
+ q2 = any_as_fmpz(q)
99
+ if q2 is NotImplemented :
100
100
raise TypeError (" cannot create fmpq from object of type %s " % type (q))
101
- if fmpz_is_zero((< fmpz> q ).val):
101
+ if fmpz_is_zero((< fmpz> q2 ).val):
102
102
raise ZeroDivisionError (" cannot create rational number with zero denominator" )
103
103
104
- fmpz_set(fmpq_numref(self .val), (< fmpz> p ).val)
105
- fmpz_set(fmpq_denref(self .val), (< fmpz> q ).val)
104
+ fmpz_set(fmpq_numref(self .val), (< fmpz> p2 ).val)
105
+ fmpz_set(fmpq_denref(self .val), (< fmpz> q2 ).val)
106
106
fmpq_canonicalise(self .val)
107
107
108
108
def __richcmp__ (s , t , int op ):
0 commit comments