Giter Club home page Giter Club logo

Comments (5)

erictwalker18 avatar erictwalker18 commented on September 25, 2024

I'm not convinced a set is a better way to manage the queue than a list. That being said, probably not a good idea to sort. Updated link:

return set(self.element_serialize(val) for val in sorted(value))

from falcano.

erictwalker18 avatar erictwalker18 commented on September 25, 2024

After a little research, dynamo will return the set in a random order that differs per request. I still agree it shouldn't be sorted, but do not manage an ordered data set with a set in dynamo.

from falcano.

mneil avatar mneil commented on September 25, 2024

🤔 good points. I see now that sets are not ordered, lists are https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html. So sorted here doesn't really affect anything. I wonder what the original intent was of sorted here then and what purpose it serves. Seems like extra computation for no reason.

from falcano.

mneil avatar mneil commented on September 25, 2024

Actually, no need to wonder. Pynamo https://github.com/pynamodb/PynamoDB/pull/151/files. This seems to exist entirely to facilitate testing (comparing lists that are sorted is easier). We definitely should remove that and optimize for usage performance, not ease of testing, if that is the real reason it exists.

from falcano.

erictwalker18 avatar erictwalker18 commented on September 25, 2024

Yeah, it even coerces sets to lists, I fixed it here: #7

from falcano.

Related Issues (6)

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.