I don't have the details ready - but in the ASPN cookbook are recipes to e.g. figure insied a function f out how many results the caller of f expects - and act accordingly. This boils down to inspect the call-stack. So it ceratinly is possible.
However, I'd say it is almost 100% a design flaw. Or can you give us a compelling reason why you need this behaviour? Diez -- http://mail.python.org/mailman/listinfo/python-list