title: In Python, decorate two methods with the same name to distinguish them
body: <p>I am writing a framework to be used by people who know some Python. I have settled on some syntax, and it makes sense to me and them to use something like this, where Base is the Base class that implements the framework.</p>
  <pre><code>class A(Base):
      @decorator1
      @decorator2
      @decorator3
      def f(self):
          pass
  
      @decorator4
      def f(self):
          pass
  
      @decorator5
      def g(self)
          pass
  </code></pre>
  <p>All my framework is implemented via Base's metaclass. This setup is appropriate for my use case, because all these user-defined classes have a rich inheritance graph. I expect the user to implement some of the methods, or just leave it with <code>pass</code>. Much of the information that the user is giving here is in the decorators. This allows me to avoid other solutions where the user would have to monkey-patch, give less structured dictionaries, and things like that.</p>
  <p>My problem here is that <code>f</code> is defined twice by the user (with good reason), and this should be handled by my framework. Unfortunately, by the time this gets to the metaclass'<code>__new__</code> method, the dictionary of attributes contains only one key <code>f</code>. My idea was to use yet another decorator, such as <code>@duplicate</code> for the user to signal this is happening, and the two <code>f</code>'s to be wrapped differently so they don't overwrite each other. Can something like this work?</p>