title: returning from a function immediately after calling another function
body: <p>Function <code>calculate_attribute</code> does not return a value; it only works through side effects.</p>
  
  <p>Often within that function I have to write these few lines:</p>
  
  <pre><code>print('some message')
  set_attribute(value)
  return
  </code></pre>
  
  <p>So I decided to put this into a different function:</p>
  
  <pre><code>def report_and_set(value, message):
    print(message)
    set_attribute(value)
  </code></pre>
  
  <p>Is it ok to now do the following:</p>
  
  <pre><code>   def calculate_attribute(params):
       #...
       if something:
         return report_and_set(value, message)
       #...
       if another_condition:
         return report_and_set(value, message)
       #...     
  </code></pre>
  
  <p>It feels kinda weird to write this since <code>report_and_set</code> has no return value. But if I don't, I'd have to repeatedly type <code>return</code> after every call to <code>report_and_set</code>.</p>