PageRenderTime 32ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/1.0/classes/cf.List.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 250 lines | 225 code | 25 blank | 0 comment | 0 complexity | f42686146ba2a88e1afdee09dd1e4025 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>cf.List &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '1.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <script type="text/javascript" src="../_static/copybutton.js"></script>
  22. <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  23. <link rel="top" title="Documentation" href="../index.html" />
  24. <link rel="up" title="Classes of the cf module" href="../class.html" />
  25. <link rel="next" title="cf.List.copy" href="../generated/cf.List.copy.html" />
  26. <link rel="prev" title="cf.Dict.values" href="../generated/cf.Dict.values.html" />
  27. </head>
  28. <body>
  29. <div class="related">
  30. <h3>Navigation</h3>
  31. <ul>
  32. <li class="right" style="margin-right: 10px">
  33. <a href="../genindex.html" title="General Index"
  34. accesskey="I">index</a></li>
  35. <li class="right" >
  36. <a href="../generated/cf.List.copy.html" title="cf.List.copy"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="../generated/cf.Dict.values.html" title="cf.Dict.values"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  42. <li><select onchange="location = this.options[this.selectedIndex].value;">
  43. <option value="../../1.0/index.html"selected>1.0
  44. <option value="../../0.9.9/index.html">0.9.9
  45. <option value="../../0.9.8.3/index.html">0.9.8.3
  46. <option value="../../archive.html">Archive
  47. </select>
  48. </li>
  49. <li><a href="../index.html">Documentation</a> &raquo;</li>
  50. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  51. <li><a href="../class.html" accesskey="U">Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  52. </ul>
  53. </div>
  54. <div class="document">
  55. <div class="documentwrapper">
  56. <div class="bodywrapper">
  57. <div class="body">
  58. <div class="section" id="cf-list">
  59. <h1>cf.List<a class="headerlink" href="#cf-list" title="Permalink to this headline"></a></h1>
  60. <dl class="class">
  61. <dt id="cf.List">
  62. <em class="property">class </em><tt class="descclassname">cf.</tt><tt class="descname">List</tt><big>(</big><em>elements=None</em><big>)</big><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.0/cf/utils.py#cl-16"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.List" title="Permalink to this definition"></a></dt>
  63. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">_abcoll.MutableSequence</span></tt></p>
  64. <p>A list-like object with attributes.</p>
  65. <p><strong>Initialization</strong></p>
  66. <table class="docutils field-list" frame="void" rules="none">
  67. <col class="field-name" />
  68. <col class="field-body" />
  69. <tbody valign="top">
  70. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
  71. <dt>sequence <span class="classifier-delimiter">:</span> <span class="classifier">iterable, optional</span></dt>
  72. <dd><p class="first last">Define a new list with these elements.</p>
  73. </dd>
  74. </dl>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. </dd></dl>
  80. <div class="section" id="list-methods">
  81. <h2>List methods<a class="headerlink" href="#list-methods" title="Permalink to this headline"></a></h2>
  82. <table border="1" class="longtable docutils">
  83. <colgroup>
  84. <col width="10%" />
  85. <col width="90%" />
  86. </colgroup>
  87. <tbody valign="top">
  88. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.copy.html#cf.List.copy" title="cf.List.copy"><tt class="xref py py-obj docutils literal"><span class="pre">copy</span></tt></a></td>
  89. <td>Return a deep copy.</td>
  90. </tr>
  91. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.count.html#cf.List.count" title="cf.List.count"><tt class="xref py py-obj docutils literal"><span class="pre">count</span></tt></a></td>
  92. <td>Return the number of occurrences of a value</td>
  93. </tr>
  94. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.delattr.html#cf.List.delattr" title="cf.List.delattr"><tt class="xref py py-obj docutils literal"><span class="pre">delattr</span></tt></a></td>
  95. <td>Delete a named attribute on each element of the list.</td>
  96. </tr>
  97. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.equals.html#cf.List.equals" title="cf.List.equals"><tt class="xref py py-obj docutils literal"><span class="pre">equals</span></tt></a></td>
  98. <td>True if two instances are equal, False otherwise.</td>
  99. </tr>
  100. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.getattr.html#cf.List.getattr" title="cf.List.getattr"><tt class="xref py py-obj docutils literal"><span class="pre">getattr</span></tt></a></td>
  101. <td>Get a named attribute from each element of the list.</td>
  102. </tr>
  103. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.index.html#cf.List.index" title="cf.List.index"><tt class="xref py py-obj docutils literal"><span class="pre">index</span></tt></a></td>
  104. <td>Return the first index of a value.</td>
  105. </tr>
  106. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.iter.html#cf.List.iter" title="cf.List.iter"><tt class="xref py py-obj docutils literal"><span class="pre">iter</span></tt></a></td>
  107. <td>Return an iterator over the results of a method applied to each element.</td>
  108. </tr>
  109. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.method.html#cf.List.method" title="cf.List.method"><tt class="xref py py-obj docutils literal"><span class="pre">method</span></tt></a></td>
  110. <td>Return an list of the results of a method applied to each element.</td>
  111. </tr>
  112. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.setattr.html#cf.List.setattr" title="cf.List.setattr"><tt class="xref py py-obj docutils literal"><span class="pre">setattr</span></tt></a></td>
  113. <td>Set a named attribute on each element of the list.</td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. </div>
  118. <div class="section" id="list-list-like-methods">
  119. <h2>List list-like methods<a class="headerlink" href="#list-list-like-methods" title="Permalink to this headline"></a></h2>
  120. <p>These methods provide functionality exactly as their counterparts in a
  121. built-in <a class="reference external" href="http://docs.python.org/2.7/library/functions.html#list" title="(in Python v2.7)"><tt class="xref py py-obj docutils literal"><span class="pre">list</span></tt></a>.</p>
  122. <table border="1" class="longtable docutils">
  123. <colgroup>
  124. <col width="10%" />
  125. <col width="90%" />
  126. </colgroup>
  127. <tbody valign="top">
  128. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.append.html#cf.List.append" title="cf.List.append"><tt class="xref py py-obj docutils literal"><span class="pre">append</span></tt></a></td>
  129. <td></td>
  130. </tr>
  131. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.extend.html#cf.List.extend" title="cf.List.extend"><tt class="xref py py-obj docutils literal"><span class="pre">extend</span></tt></a></td>
  132. <td></td>
  133. </tr>
  134. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.insert.html#cf.List.insert" title="cf.List.insert"><tt class="xref py py-obj docutils literal"><span class="pre">insert</span></tt></a></td>
  135. <td></td>
  136. </tr>
  137. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.pop.html#cf.List.pop" title="cf.List.pop"><tt class="xref py py-obj docutils literal"><span class="pre">pop</span></tt></a></td>
  138. <td></td>
  139. </tr>
  140. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.remove.html#cf.List.remove" title="cf.List.remove"><tt class="xref py py-obj docutils literal"><span class="pre">remove</span></tt></a></td>
  141. <td></td>
  142. </tr>
  143. <tr class="row-even"><td><a class="reference internal" href="../generated/cf.List.reverse.html#cf.List.reverse" title="cf.List.reverse"><tt class="xref py py-obj docutils literal"><span class="pre">reverse</span></tt></a></td>
  144. <td></td>
  145. </tr>
  146. <tr class="row-odd"><td><a class="reference internal" href="../generated/cf.List.sort.html#cf.List.sort" title="cf.List.sort"><tt class="xref py py-obj docutils literal"><span class="pre">sort</span></tt></a></td>
  147. <td></td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <div class="sphinxsidebar">
  157. <div class="sphinxsidebarwrapper">
  158. <h3><a href="../index.html">Table Of Contents</a></h3>
  159. <ul>
  160. <li><a class="reference internal" href="#">cf.List</a><ul>
  161. <li><a class="reference internal" href="#list-methods">List methods</a></li>
  162. <li><a class="reference internal" href="#list-list-like-methods">List list-like methods</a></li>
  163. </ul>
  164. </li>
  165. </ul>
  166. <h4>Previous topic</h4>
  167. <p class="topless"><a href="../generated/cf.Dict.values.html"
  168. title="previous chapter">cf.Dict.values</a></p>
  169. <h4>Next topic</h4>
  170. <p class="topless"><a href="../generated/cf.List.copy.html"
  171. title="next chapter">cf.List.copy</a></p>
  172. <h3>This Page</h3>
  173. <ul class="this-page-menu">
  174. <li><a href="../_sources/classes/cf.List.txt"
  175. rel="nofollow">Show Source</a></li>
  176. </ul>
  177. <div id="searchbox" style="display: none">
  178. <h3>Quick search</h3>
  179. <form class="search" action="../search.html" method="get">
  180. <input type="text" name="q" />
  181. <input type="submit" value="Go" />
  182. <input type="hidden" name="check_keywords" value="yes" />
  183. <input type="hidden" name="area" value="default" />
  184. </form>
  185. <p class="searchtip" style="font-size: 90%">
  186. Enter search terms or a module, class or function name.
  187. </p>
  188. </div>
  189. <script type="text/javascript">$('#searchbox').show(0);</script>
  190. </div>
  191. </div>
  192. <div class="clearer"></div>
  193. </div>
  194. <div class="related">
  195. <h3>Navigation</h3>
  196. <ul>
  197. <li class="right" style="margin-right: 10px">
  198. <a href="../genindex.html" title="General Index"
  199. >index</a></li>
  200. <li class="right" >
  201. <a href="../generated/cf.List.copy.html" title="cf.List.copy"
  202. >next</a> |</li>
  203. <li class="right" >
  204. <a href="../generated/cf.Dict.values.html" title="cf.Dict.values"
  205. >previous</a> |</li>
  206. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  207. <li><select onchange="location = this.options[this.selectedIndex].value;">
  208. <option value="../../1.0/index.html"selected>1.0
  209. <option value="../../0.9.9/index.html">0.9.9
  210. <option value="../../0.9.8.3/index.html">0.9.8.3
  211. <option value="../../archive.html">Archive
  212. </select>
  213. </li>
  214. <li><a href="../index.html">Documentation</a> &raquo;</li>
  215. <li><a href="../reference.html" >Reference manual</a> &raquo;</li>
  216. <li><a href="../class.html" >Classes of the <tt class="docutils literal"><span class="pre">cf</span></tt> module</a> &raquo;</li>
  217. </ul>
  218. </div>
  219. <div class="footer">
  220. &copy; Copyright 2015, David Hassell.
  221. Last updated on May 27, 2015.
  222. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
  223. </div>
  224. </body>
  225. </html>