title: how to program functions with alternative return value signatures in python? (next() for alternative iterators)
body: <p>e.g. so that these would both work - is it possible?</p>
  
  <pre><code>(val,VAL2) = func(args) 
  val = func(args)
  </code></pre>
  
  <p>Where <strong>val</strong> is <strong>not a tuple</strong></p>
  
  <p>For example I'd like these to work for my custom object <strong>something</strong></p>
  
  <pre><code>for item in something:
      do_item(item) #where again item - is not a tuple
  
  for (item,key) in something:
      do_more(key,item)
  </code></pre>
  
  <p>I thought that I need to implement next() function in two different ways... </p>
  
  <p><strong>edit:</strong> as follows from the answers below, this should not really be done.</p>