title: How to use a function outside a class as a property inside a class?
body: <p>I'm having some problems. How we can define a function outside of a function that can be used in a class property? Also, how we can insert the <code>self</code> parameter into the function signature? I would like to visualize it like this:</p>
  
  <pre><code>&gt;&gt;&gt; def a(self, x):   #I thought maybe class will give "self" to this property function
  ...     print(self)
  ... 
  &gt;&gt;&gt; class aa:
  ...     def __init__(self):
  ...         pass
  ...     @a
  ...     def p():
  ...         print('in it')
  ... 
      Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
      File "&lt;stdin&gt;", line 4, in aa
      TypeError: a() missing 1 required positional argument: 'x'
  </code></pre>
  
  <p>I want to define a function outside but to use inside of a class. Like a class's method as a property. How can I do this?</p>