Giter VIP home page Giter VIP logo

Comments (2)

jannikluhn avatar jannikluhn commented on June 8, 2024 1

Fair enough, sounds reasonable! I just stumbled over this by accident and was a little bit surprised by the behavior, so I wanted to point it out.

from fastecdsa.

AntonKueltz avatar AntonKueltz commented on June 8, 2024

It is a bit unconventional compared to the builtin types and their comparisons, but I think it provides a clearer picture to the user as to what is going on. The cases being -

  • Two points have the same x and y coordinates on the same curve -> True as the points are equal
  • Two points are not on the same curve or having differing x and y coordinates -> False as the points are not equal
  • A point is compared to something that isn't a point -> TypeError this comparison does not make sense / cannot be made, and distinguishes the comparison from two points being compared but not being equal

If there's a use case where this is an issue I'm happy to reconsider, but my initial thoughts here are that this provides stronger and clearer indications of what's going on than just returning False and not failing / throwing an exception.

from fastecdsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.