sku-pg
Version:
Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!
2,183 lines • 24.5 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: object</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: object</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Sk.html">Sk</a><a href="Sk.builtin.html">.builtin</a>.</span>
object
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="object"><span class="type-signature"></span>new object<span class="signature">()</span><span class="type-signature"> → {<a href="Sk.builtin.object.html">Sk.builtin.object</a>}</span></h4>
<div class="description">
<p>Constructor for Python object. All Python classes (builtin and user-defined)
should inherit from this class.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Python object</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.object.html">Sk.builtin.object</a></span>
</dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".pythonFunctions"><span class="type-signature">(static) </span>pythonFunctions<span class="type-signature"> :Array</span></h4>
<div class="description">
<p>Array of all the Python functions which are methods of this class.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Array</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line380">line 380</a>
</li></ul></dd>
</dl>
<h4 class="name" id="$r"><span class="type-signature"></span>$r<span class="type-signature"></span></h4>
<div class="description">
<p>Return the string representation of this instance.</p>
<p>Javascript function, returns Python object.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line253">line 253</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__eq__"><span class="type-signature"></span>__eq__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__eq__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line179">line 179</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__ge__"><span class="type-signature"></span>__ge__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__ge__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line239">line 239</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__gt__"><span class="type-signature"></span>__gt__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__gt__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line227">line 227</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__hash__"><span class="type-signature"></span>__hash__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__hash__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line167">line 167</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__le__"><span class="type-signature"></span>__le__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__le__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line215">line 215</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__lt__"><span class="type-signature"></span>__lt__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__lt__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line203">line 203</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__ne__"><span class="type-signature"></span>__ne__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__ne__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line191">line 191</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__repr__"><span class="type-signature"></span>__repr__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__repr__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line143">line 143</a>
</li></ul></dd>
</dl>
<h4 class="name" id="__str__"><span class="type-signature"></span>__str__<span class="type-signature"></span></h4>
<div class="description">
<p>Python wrapper for <code>__str__</code> method.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line155">line 155</a>
</li></ul></dd>
</dl>
<h4 class="name" id="ob$type"><span class="type-signature"></span>ob$type<span class="type-signature"> :Sk.builtin.type</span></h4>
<div class="description">
<p>The type object of this class.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Sk.builtin.type</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line138">line 138</a>
</li></ul></dd>
</dl>
<h4 class="name" id="tp$name"><span class="type-signature"></span>tp$name<span class="type-signature"> :string</span></h4>
<div class="description">
<p>The name of this class.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line132">line 132</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="GenericGetAttr"><span class="type-signature"></span>GenericGetAttr<span class="signature">()</span><span class="type-signature"> → {undefined}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line26">line 26</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="ob$eq"><span class="type-signature"></span>ob$eq<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Perform equality check between this instance and a Python object (i.e. this == other).</p>
<p>Implements <code>__eq__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to check for equality.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line293">line 293</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if equal, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="ob$ge"><span class="type-signature"></span>ob$ge<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Determine if this instance is greater than or equal to a Python object (i.e. this >= other).</p>
<p>Implements <code>__ge__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to compare.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line371">line 371</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if this >= other, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="ob$gt"><span class="type-signature"></span>ob$gt<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Determine if this instance is greater than a Python object (i.e. this > other).</p>
<p>Implements <code>__gt__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to compare.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line357">line 357</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if this > other, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="ob$le"><span class="type-signature"></span>ob$le<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Determine if this instance is less than or equal to a Python object (i.e. this <= other).</p>
<p>Implements <code>__le__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to compare.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line343">line 343</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if this <= other, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="ob$lt"><span class="type-signature"></span>ob$lt<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Determine if this instance is less than a Python object (i.e. this < other).</p>
<p>Implements <code>__lt__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to compare.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line329">line 329</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if this < other, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="ob$ne"><span class="type-signature"></span>ob$ne<span class="signature">(other)</span><span class="type-signature"> → {<a href="Sk.builtin.bool.html">Sk.builtin.bool</a>|<a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a>}</span></h4>
<div class="description">
<p>Perform non-equality check between this instance and a Python object (i.e. this != other).</p>
<p>Implements <code>__ne__</code> dunder method.</p>
<p>Javascript function, returns Python object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The Python object to check for non-equality.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line311">line 311</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if not equal, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.bool.html">Sk.builtin.bool</a></span>
|
<span class="param-type"><a href="Sk.builtin.NotImplemented.html">Sk.builtin.NotImplemented</a></span>
</dd>
</dl>
<h4 class="name" id="tp$hash"><span class="type-signature"></span>tp$hash<span class="signature">()</span><span class="type-signature"> → {<a href="Sk.builtin.int_.html">Sk.builtin.int_</a>}</span></h4>
<div class="description">
<p>Return the hash value of this instance.</p>
<p>Javascript function, returns Python object.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="object.js.html">object.js</a>, <a href="object.js.html#line275">line 275</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The hash value</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Sk.builtin.int_.html">Sk.builtin.int_</a></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Sk.abstr.iter-seqIter.html">seqIter</a></li><li><a href="Sk.builtin.bool.html">bool</a></li><li><a href="Sk.builtin.float_.html">float_</a></li><li><a href="Sk.builtin.func.html">func</a></li><li><a href="Sk.builtin.int_.html">int_</a></li><li><a href="Sk.builtin.none.html">none</a></li><li><a href="Sk.builtin.NotImplemented.html">NotImplemented</a></li><li><a href="Sk.builtin.numtype.html">numtype</a></li><li><a href="Sk.builtin.object.html">object</a></li><li><a href="Sk.builtin.seqtype.html">seqtype</a></li><li><a href="Sk.misceval.Suspension.html">Suspension</a></li></ul><h3>Namespaces</h3><ul><li><a href="Sk.html">Sk</a></li><li><a href="Sk.abstr.html">abstr</a></li><li><a href="Sk.builtin.html">builtin</a></li><li><a href="Sk.ffi.html">ffi</a></li><li><a href="Sk.misceval.html">misceval</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0</a> on Thu Aug 13 2015 08:14:27 GMT-0500 (CDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>