Skip to content

Releases: benhall-7/pyprc

Updated hash methods and support python version 3.10

05 Nov 16:17
Compare
Choose a tag to compare
  • Python versions available have been shifted from [3.6 to 3.9] to [3.7 to 3.10] to support the latest version.
  • The hash class now relies on the loaded label map to determine how to convert a string into a hash. If a label isn't found, it falls back to the regular algorithm.
  • You can also use the hash.set_strict(true) method to change the fallback behavior, and throw an error if the label is not found. This might help a user to catch typos in label names.
  • With the hash.algo("my_string") method, you can use the hash40 algorithm directly and skip label lookups. You probably will not need to use this unless you are using the strict flag.

0.3.0

04 Mar 23:09
Compare
Choose a tag to compare
  • Before, the mutate method would simply redefine the pointer associated with a variable, but not change underlying values of the original pointer. Clearly I didn’t test this well enough because I expected it to rewrite params entirely.
  • The ‘mutate’ method has been removed and replaced with several new methods, one for each possible param type: ‘set_bool’, ‘set_i8’, etc. This functions similarly to the param constructors, but it operates on existing param objects. Just provide a value to set the param to. Since most params are alterable by value, this allows you to also change the type of a param, or to change list/struct params after altering them via separate data structures

0.2.0

03 Mar 15:36
Compare
Choose a tag to compare

‘hash’ class changes:

  • hash.value now returns the integer representation always
  • str(hash) now returns the string representation without any prefix
    • before: ‘hash (“param_name”)’
    • after: “param_name”
    • repr(hash) still returns the former representation

‘param’ changes:

  • You can now retrieve length of param structs and lists directly with len(param)
  • You can now mutate a param‘s identity with the param.mutate method. Whereas in order to do this previously, you would need to access the parent and reassign this param to a new one, you can now do it with a direct reference. This allows you to convert list or struct params to an intermediate form (lists or dicts), edit them, then modify the base param without going through its parent

0.1.1

17 Feb 01:21
Compare
Choose a tag to compare
Version bump

0.1.0

15 Feb 06:26
Compare
Choose a tag to compare
See if this works...