snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
5 stars 2 forks source link

Swift-call result interface #141

Closed kangz12345 closed 1 year ago

kangz12345 commented 1 year ago

I implemented the interface for getting swift-call results.

Few insights:

  1. The Result class will be used in apps to manage the swift-calls in the future. It will be implemented maybe in #136.

  2. QObject.sender() is convenient, but we have to be careful as the document says, which implies that it easily breaks our assumptions and intuition. For example, consider the case where a slot is not called by a signal.

    Warning: This function violates the object-oriented principle of modularity.

  3. Pylint complains about catching Exception. However, I intended to do that, so I applied this solution.

  4. In a function docstring, we don't document the exceptions raised when the input violates the documented condition.

This closes #131.