I believe I can ensure type safety and correctness with all methods available to client, using if isinstance...raise TypeError to check arguments before passing to backend class objects/calling methods.
This is not a failsafe against objects not intended to be modified by the client. For instance, here is one way to delete all data from the default logfile:
analyzer = Analyze()
parser = analyzer.parser
parser.logs = []
analyzer.confirm_nuke()
This would work correctly with the current implementation, but the type of parser.logs is never exposed to client and could change as I modify the backend.
I suggest we include a method like parser.wipe_logs(), possibly even hidden to the client, but ensuring that future changes do not cause weird behavior to sensitive values.
I believe I can ensure type safety and correctness with all methods available to client, using
if isinstance...raise TypeErrorto check arguments before passing to backend class objects/calling methods.This is not a failsafe against objects not intended to be modified by the client. For instance, here is one way to delete all data from the default logfile:
This would work correctly with the current implementation, but the type of parser.logs is never exposed to client and could change as I modify the backend.
I suggest we include a method like parser.wipe_logs(), possibly even hidden to the client, but ensuring that future changes do not cause weird behavior to sensitive values.