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

/docs/1.1.10/generated/cf.Field.copy.html

https://bitbucket.org/cfpython/cfpython.bitbucket.org
HTML | 204 lines | 160 code | 14 blank | 30 comment | 0 complexity | 350f13c659b951cde06b165c448f6a5d 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.Field.copy &mdash; Documentation</title>
  7. <link rel="stylesheet" href="../_static/classic.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.1.10',
  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="https://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="cf.Field" href="../classes/cf.Field.html" />
  25. <link rel="next" title="cf.Field.dump" href="cf.Field.dump.html" />
  26. <link rel="prev" title="cf.Field.concatenate" href="cf.Field.concatenate.html" />
  27. </head>
  28. <body role="document">
  29. <div class="related" role="navigation" aria-label="related navigation">
  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="cf.Field.dump.html" title="cf.Field.dump"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="cf.Field.concatenate.html" title="cf.Field.concatenate"
  40. accesskey="P">previous</a> |</li>
  41. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.10</a> &raquo;</li>
  42. <!--
  43. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  44. <li><select onchange="location = this.options[this.selectedIndex].value;">
  45. <option value="../../1.0/index.html">1.0
  46. <option value="../../0.9.9/index.html">0.9.9
  47. <option value="../../0.9.8.3/index.html">0.9.8.3
  48. <option value="../../archive.html">Archive
  49. </select>
  50. </li>
  51. -->
  52. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  53. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  54. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  55. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" accesskey="U">cf.Field</a> &raquo;</li>
  56. </ul>
  57. </div>
  58. <div class="document">
  59. <div class="documentwrapper">
  60. <div class="bodywrapper">
  61. <div class="body" role="main">
  62. <div class="section" id="cf-field-copy">
  63. <h1>cf.Field.copy<a class="headerlink" href="#cf-field-copy" title="Permalink to this headline">Âś</a></h1>
  64. <dl class="method">
  65. <dt id="cf.Field.copy">
  66. <code class="descclassname">Field.</code><code class="descname">copy</code><span class="sig-paren">(</span><em>_omit_Data=False</em>, <em>_only_Data=False</em>, <em>_omit_special=None</em>, <em>_omit_properties=False</em>, <em>_omit_attributes=False</em><span class="sig-paren">)</span><a class="reference external" href="https://bitbucket.org/cfpython/cf-python/src/v1.1.10/cf/variable.py#variable.py-4161"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cf.Field.copy" title="Permalink to this definition">Âś</a></dt>
  67. <dd><p>Return a deep copy.</p>
  68. <p><code class="docutils literal"><span class="pre">f.copy()</span></code> is equivalent to <code class="docutils literal"><span class="pre">copy.deepcopy(f)</span></code>.</p>
  69. <table class="docutils field-list" frame="void" rules="none">
  70. <col class="field-name" />
  71. <col class="field-body" />
  72. <tbody valign="top">
  73. <tr class="field-odd field"><th class="field-name">Examples 1:</th><td class="field-body"></td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
  78. </pre></div>
  79. </div>
  80. <table class="docutils field-list" frame="void" rules="none">
  81. <col class="field-name" />
  82. <col class="field-body" />
  83. <tbody valign="top">
  84. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
  85. <dt>out :</dt>
  86. <dd><p class="first last">The deep copy.</p>
  87. </dd>
  88. </dl>
  89. </td>
  90. </tr>
  91. <tr class="field-even field"><th class="field-name">Examples 2:</th><td class="field-body"></td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
  96. <span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="ow">is</span> <span class="n">f</span>
  97. <span class="go">False</span>
  98. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">g</span><span class="p">)</span>
  99. <span class="go">True</span>
  100. <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">copy</span>
  101. <span class="gp">&gt;&gt;&gt; </span><span class="n">h</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
  102. <span class="gp">&gt;&gt;&gt; </span><span class="n">h</span> <span class="ow">is</span> <span class="n">f</span>
  103. <span class="go">False</span>
  104. <span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">g</span><span class="p">)</span>
  105. <span class="go">True</span>
  106. </pre></div>
  107. </div>
  108. </dd></dl>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  114. <div class="sphinxsidebarwrapper">
  115. <h4>Previous topic</h4>
  116. <p class="topless"><a href="cf.Field.concatenate.html"
  117. title="previous chapter">cf.Field.concatenate</a></p>
  118. <h4>Next topic</h4>
  119. <p class="topless"><a href="cf.Field.dump.html"
  120. title="next chapter">cf.Field.dump</a></p>
  121. <div role="note" aria-label="source link">
  122. <h3>This Page</h3>
  123. <ul class="this-page-menu">
  124. <li><a href="../_sources/generated/cf.Field.copy.txt"
  125. rel="nofollow">Show Source</a></li>
  126. </ul>
  127. </div>
  128. <div id="searchbox" style="display: none" role="search">
  129. <h3>Quick search</h3>
  130. <form class="search" action="../search.html" method="get">
  131. <input type="text" name="q" />
  132. <input type="submit" value="Go" />
  133. <input type="hidden" name="check_keywords" value="yes" />
  134. <input type="hidden" name="area" value="default" />
  135. </form>
  136. <p class="searchtip" style="font-size: 90%">
  137. Enter search terms or a module, class or function name.
  138. </p>
  139. </div>
  140. <script type="text/javascript">$('#searchbox').show(0);</script>
  141. </div>
  142. </div>
  143. <div class="clearer"></div>
  144. </div>
  145. <div class="related" role="navigation" aria-label="related navigation">
  146. <h3>Navigation</h3>
  147. <ul>
  148. <li class="right" style="margin-right: 10px">
  149. <a href="../genindex.html" title="General Index"
  150. >index</a></li>
  151. <li class="right" >
  152. <a href="cf.Field.dump.html" title="cf.Field.dump"
  153. >next</a> |</li>
  154. <li class="right" >
  155. <a href="cf.Field.concatenate.html" title="cf.Field.concatenate"
  156. >previous</a> |</li>
  157. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python 1.1.10</a> &raquo;</li>
  158. <!--
  159. <li><a target="_blank" href="http://cfpython.bitbucket.org">cf-python</a> &raquo;</li>
  160. <li><select onchange="location = this.options[this.selectedIndex].value;">
  161. <option value="../../1.0/index.html">1.0
  162. <option value="../../0.9.9/index.html">0.9.9
  163. <option value="../../0.9.8.3/index.html">0.9.8.3
  164. <option value="../../archive.html">Archive
  165. </select>
  166. </li>
  167. -->
  168. <li class="nav-item nav-item-0"><a href="../index.html">Documentation</a> &raquo;</li>
  169. <li class="nav-item nav-item-1"><a href="../reference.html" >Reference manual</a> &raquo;</li>
  170. <li class="nav-item nav-item-2"><a href="../class.html" >Classes of the <code class="docutils literal"><span class="pre">cf</span></code> module</a> &raquo;</li>
  171. <li class="nav-item nav-item-3"><a href="../classes/cf.Field.html" >cf.Field</a> &raquo;</li>
  172. </ul>
  173. </div>
  174. <div class="footer" role="contentinfo">
  175. &copy; Copyright 2016, David Hassell.
  176. Last updated on Jun 23, 2016.
  177. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
  178. </div>
  179. </body>
  180. </html>