Popular recipes tagged "property" but not "class"http://code.activestate.com/recipes/tags/property-class/2012-05-09T23:24:55-07:00ActiveState Code RecipesItem Properties (Python)
2012-05-09T23:24:55-07:00Ian Kellyhttp://code.activestate.com/recipes/users/4178016/http://code.activestate.com/recipes/577703-item-properties/
<p style="color: grey">
Python
recipe 577703
by <a href="/recipes/users/4178016/">Ian Kelly</a>
(<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/descriptor/">descriptor</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/property/">property</a>).
Revision 2.
</p>
<p>A property variation that allows property access using an index or key.</p>
Attribute - easy way to define interface (Python)
2011-03-06T12:49:30-08:00ilon asolothttp://code.activestate.com/recipes/users/4177080/http://code.activestate.com/recipes/577598-attribute-easy-way-to-define-interface/
<p style="color: grey">
Python
recipe 577598
by <a href="/recipes/users/4177080/">ilon asolot</a>
(<a href="/recipes/tags/attribute/">attribute</a>, <a href="/recipes/tags/interface/">interface</a>, <a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>it is an enhanced property</p>
<pre class="prettyprint"><code> * initialize attribute in class definition scope
* easily keep the attribute behaviors in sub classes.
* easy to define interface.
* not afraid to forget the super(klass, self).__init__(...) :P
</code></pre>
Attribute - easy way to define interface (Python)
2011-02-20T16:31:08-08:00Hui Zhanghttp://code.activestate.com/recipes/users/4177055/http://code.activestate.com/recipes/577579-attribute-easy-way-to-define-interface/
<p style="color: grey">
Python
recipe 577579
by <a href="/recipes/users/4177055/">Hui Zhang</a>
(<a href="/recipes/tags/attribute/">attribute</a>, <a href="/recipes/tags/interface/">interface</a>, <a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/python/">python</a>).
Revision 2.
</p>
<p>it is an enhanced property</p>
<pre class="prettyprint"><code> * initialize attribute in class definition scope
* easily keep the attribute behaviors in sub classes.
* easy to define interface.
* not afraid to forget the super(klass, self).__init__(...) :P
</code></pre>
Convert PyQt properties to Python properties (Python)
2011-01-09T02:02:30-08:00Miguel Turnerhttp://code.activestate.com/recipes/users/4176460/http://code.activestate.com/recipes/577539-convert-pyqt-properties-to-python-properties/
<p style="color: grey">
Python
recipe 577539
by <a href="/recipes/users/4176460/">Miguel Turner</a>
(<a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/pyqt/">pyqt</a>, <a href="/recipes/tags/pyside/">pyside</a>, <a href="/recipes/tags/python/">python</a>).
Revision 2.
</p>
<p>This recipe will find all attributes created as meta-object properties in Qt and will create a Python property of the same name for each of them. This is a quick way of providing some of the functionality suggested by <a href="http://www.pyside.org/docs/pseps/psep-0102.html">PSEP 102</a>, which I sincerely hope will be accepted, as it will make PySide considerably more pythonic.</p>
Git Shell Script to enhance inline automation script... (Bash)
2010-11-01T00:43:03-07:00Patrick Riendeauhttp://code.activestate.com/recipes/users/4175653/http://code.activestate.com/recipes/577447-git-shell-script-to-enhance-inline-automation-scri/
<p style="color: grey">
Bash
recipe 577447
by <a href="/recipes/users/4175653/">Patrick Riendeau</a>
(<a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/concurrency/">concurrency</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/oriented/">oriented</a>, <a href="/recipes/tags/programs/">programs</a>, <a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/property_creation/">property_creation</a>, <a href="/recipes/tags/repository/">repository</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/shelve/">shelve</a>).
</p>
<p>This tiny effort, depend from Fnct.D ActiveState no.577446 Core, also available from github <a href="http://github.com/priendeau/Fnct.d" rel="nofollow">http://github.com/priendeau/Fnct.d</a>, can develop basic methodology of implementing oriented program within uses of function re-declaration with function-parser to create both property-function to discover uses of getter-function and setter-function</p>
Cached Property (Python)
2010-05-19T22:38:24-07:00Ken Seeharthttp://code.activestate.com/recipes/users/4167995/http://code.activestate.com/recipes/576563-cached-property/
<p style="color: grey">
Python
recipe 576563
by <a href="/recipes/users/4167995/">Ken Seehart</a>
(<a href="/recipes/tags/cache/">cache</a>, <a href="/recipes/tags/property/">property</a>).
</p>
<p>A cached property is a read-only property that is calculated on demand and automatically cached. If the value has already been calculated, the cached value is returned.</p>
Property wrapper (Python)
2010-07-20T14:30:30-07:00Louis RIVIEREhttp://code.activestate.com/recipes/users/4035877/http://code.activestate.com/recipes/502243-property-wrapper/
<p style="color: grey">
Python
recipe 502243
by <a href="/recipes/users/4035877/">Louis RIVIERE</a>
(<a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/wrapper/">wrapper</a>).
</p>
<p>This property shortcut doesn't restrict the property's attributes to get, set, del and doc.
Besides these functions can have any name, not limited to fget, fset ...
Note that the default doc is not the getter's one.</p>