-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestIssues for the HacktoberfestIssues for the Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed
Description
Is there an existing issue for this?
- I have searched the existing issues
Suggestion
There seems to be some inconsistent use of varargs in a few places that make the translation to other languages more difficult than it needs to be. The example I've come across is https://github.com/microsoft/electionguard-python/blob/main/src/electionguard/ballot.py#L757 which has the lines
contest_hashes = [contest.crypto_hash for contest in self.contests]
return hash_elems(self.object_id, encryption_seed, *contest_hashes)Possible Implementation
The code above could easily just be simply
contest_hashes = [contest.crypto_hash for contest in self.contests]
return hash_elems(self.object_id, encryption_seed, contest_hashes)which should achieve the same outcome but make translations easier when languages don't have things like heterogeneous lists. In my Haskell implementation, hashes of multiple arguments of differerent are represented using the instances for various tuple types, so I can't generate a tuple of arbitrary size at runtime.
Anything else?
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestIssues for the HacktoberfestIssues for the Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed