elliptic-shiho / ecpy

A pairing library of elliptic curve
MIT License
59 stars 13 forks source link

Fix for Python3 - ‘/’ -> '//' #9

Open MoienBowen opened 5 years ago

MoienBowen commented 5 years ago

Only replaced in file ecpy/utils/root.py. With $grep -nr ' / ' ./, there are lot of '/', to be check if works under Python 3.

elliptic-shiho commented 5 years ago

What is differences of #9 between #8?

I think we doesn't need to fix / to // because ecpy's field / ring classes having floordiv and truediv. ecpy's code has assumed to using that.

Moreover, even if we didn't fix that, ecpy has passed all test at Python 3 enviroment.

MoienBowen commented 5 years ago

What is differences of #9 between #8?

I think we doesn't need to fix / to // because ecpy's field / ring classes having floordiv and truediv. ecpy's code has assumed to using that.

Moreover, even if we didn't fix that, ecpy has passed all test at Python 3 enviroment.

No different, you can delete the request #8. In my case, there is a warning for the result which may not be a int. So '//' just force the result into an int.

elliptic-shiho commented 5 years ago

@n00d1e5 In current configuration, Travis CI checks test using Python 3.5.x. so error occurred by try import syntax. Moreover, I (still) use ecpy at Python 2.x sometimes and I wanna use common codes. so I can't merge this breaking change (but I'll fix testing environment version).