How to know name of class in decorator for function-method?
<p>I have a simple timemark-decorator for function:</p>

<pre><code>def dec_timemark(f):
    def tmp(*args, **kwargs):
        sys.stdout.write(strftime("%d.%m.%Y %H:%M:%S") + ' ' + f.__name__ +
                                                         ' begin' + "\n" )
        res = f(*args, **kwargs)
        sys.stdout.write(strftime("%d.%m.%Y %H:%M:%S") + ' ' + f.__name__ +
                                                         ' end' + "\n"     )
        return res
    return tmp
</code></pre>

<p>typical usage:</p>

<pre><code>class Task():
    @dec_timemark
    def make_torrent():
        sleep(10)
</code></pre>

<p>But how to add to this <code>decorator</code> name of the <code>class</code>? (Not to log: "<code>make_torrent begin</code>", but "<code>Task.make_torrent begin</code>" for example ) ?</p>
