/usr/share/doc/python-kiwi/api/kiwi.python.enum.html is in python-kiwi 1.9.22-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
<link rel="stylesheet" type="text/css" href="apidocs.css"/>
<title>API docs for “kiwi.python.enum”</title>
</head>
<body><h1 class="class">Class k.p.enum(int):</h1><span id="part">Part of <a href="kiwi.python.html">kiwi.python</a></span><p>known subclasses: <a href="kiwi.ui.search.DateSearchFilter.Type.html">kiwi.ui.search.DateSearchFilter.Type</a>, <a href="kiwi.enums.ComboColumn.html">kiwi.enums.ComboColumn</a>, <a href="kiwi.enums.ComboMode.html">kiwi.enums.ComboMode</a>, <a href="kiwi.enums.Alignment.html">kiwi.enums.Alignment</a>, <a href="kiwi.enums.Direction.html">kiwi.enums.Direction</a>, <a href="kiwi.enums.ListType.html">kiwi.enums.ListType</a>, <a href="kiwi.enums.SearchFilterPosition.html">kiwi.enums.SearchFilterPosition</a></p><div class="toplevel"><div><p>enum is an enumered type implementation in python.</p>
<p>To use it, define an enum subclass like this:</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span><span class="py-keyword">from</span> kiwi.python <span class="py-keyword">import</span> enum
<span class="py-prompt">>>></span>
<span class="py-prompt">>>> </span><span class="py-keyword">class</span> <span class="py-defname">Status</span>(enum):
<span class="py-prompt">>>> </span> OPEN, CLOSE = range(2)
<span class="py-prompt">>>> </span>Status.OPEN
<span class="py-output">'<Status value OPEN>'</span></pre>
<p>All the integers defined in the class are assumed to be enums and values
cannot be duplicated</p>
</div></div><table class="children"><tr class="function"><td>Function</td><td><a href="#kiwi.python.enum.__class_init__">__class_init__</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="function"><td>Function</td><td><a href="#kiwi.python.enum.get">get</a></td><td><div><p>Lookup an enum by value</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#kiwi.python.enum.__new__">__new__</a></td><td><div><p>Create a new Enum.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#kiwi.python.enum.__str__">__str__</a></td><td><span class="undocumented">Undocumented</span></td></tr></table>
<div class="function">
<div class="functionHeader">def <a name="kiwi.python.enum.__class_init__">__class_init__(cls, ns):</a></div>
<div class="functionBody"><div class="undocumented">Undocumented</div></div>
</div>
<div class="function">
<div class="functionHeader">def <a name="kiwi.python.enum.get">get(cls, value):</a></div>
<div class="functionBody"><div><p>Lookup an enum by value</p>
</div><div class="metadata"><span class="tag">param</span> <span class="arg">value</span><span class="body">the value
</span></div></div>
</div>
<div class="function">
<div class="functionHeader">def <a name="kiwi.python.enum.__new__">__new__(cls, value, name):</a></div>
<div class="functionBody"><div><p>Create a new Enum.</p>
</div><div class="metadata"><span class="tag">param</span> <span class="arg">value</span><span class="body">value of the enum
</span></div><div class="metadata"><span class="tag">param</span> <span class="arg">name</span><span class="body">name of the enum
</span></div></div>
</div>
<div class="function">
<div class="functionHeader">def <a name="kiwi.python.enum.__str__">__str__(self):</a></div>
<div class="functionBody"><div class="undocumented">Undocumented</div></div>
</div></body>
|