python-sdk
python-sdk copied to clipboard
Assign some methods as properties
Draft: depends on #18
Basically, to make the SDK more pythonic. Some methods like account.address() could be written as account.address, as arguably address is a property of account. IMO we don't really need to keep the Rust semantics here.
My criteria is:
- Returned value could be seen as a property of the object
- No other inputs needed to compute the value (see
RecordPlaintext.serial_number_string) - The method is reasonably fast to execute
- The method has no side effects
As a side note, to_string methods feels superfluous as users should just use str(...) in Python to get a string representation of the object. I decided to not removing those here though.
need to review and reconsider if methods from new classes should be changed as well. draft for now.