title: In Python, what is the difference between pass and return
body: <p>I have seen some code in Pinax and other django apps that instead of pass, an empty return statement is used. What is the difference and would it have any effect on, for example, the django code below that I am running? The code is a signal method that automatically saves the hashtags into taggit Tag objects for a tweet object.</p>
  
  <p>I saw a question here about whether having or not having a return statement in PHP makes a difference in the interpreted bytecode, but I am not sure if it is relevant to Python.</p>
  
  <pre><code>import re
  TAG_REGEX = re.compile(r'#(?P&lt;tag&gt;\w+)')
  
  def get_tagged(sender, instance, **kwargs):
      """
      Automatically add tags to a tweet object.
      """
      if not instance:
          return # will pass be better or worse here?
      post = instance
      tags_list = [smart_unicode(t).lower() for t in list(set(TAG_REGEX.findall(post.content)))]
      if tags_list:
          post.tags.add(*tags_list)
          post.save()
      else:
          return # will a pass be better or worse here?
  post_save.connect(get_tagged, sender=Tweet)
  </code></pre>