mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
stub for class attributes section
This commit is contained in:
@@ -100,6 +100,67 @@ class OrderedDict(dict, collections.MutableMapping):
|
||||
|
||||
<p class=a>⁂
|
||||
|
||||
<h2 id=class-attributes>Attributes of a Class Object</h2>
|
||||
|
||||
<p>FIXME
|
||||
|
||||
<pre class=screen>
|
||||
<samp class=p>>>> </samp><kbd>import ordereddict</kbd>
|
||||
<samp class=p>>>> </samp><kbd>od = ordereddict.OrderedDict()</kbd>
|
||||
<samp class=p>>>> </samp><kbd>klass = od.__class__</kbd>
|
||||
<samp class=p>>>> </samp><kbd>type(klass)</kbd>
|
||||
<samp><class 'abc.ABCMeta'></samp>
|
||||
<samp class=p>>>> </samp><kbd>klass.__name__</kbd>
|
||||
<samp>'OrderedDict'</samp>
|
||||
<!--
|
||||
<samp class=p>>>> </samp><kbd>klass.__doc__</kbd>
|
||||
<samp>FIXME</samp>
|
||||
-->
|
||||
<samp class=p>>>> </samp><kbd>klass.__module__</kbd>
|
||||
<samp>'ordereddict'</samp>
|
||||
<samp class=p>>>> </samp><kbd>klass.__bases__</kbd>
|
||||
<samp>(<class 'dict'>, <class '_abcoll.MutableMapping'>)</samp></pre>
|
||||
<ol>
|
||||
<li>FIXME
|
||||
</ol>
|
||||
|
||||
<pre class=screen>
|
||||
# continued from previous example
|
||||
<samp class=p>>>> </samp><kbd>klass.__dict__</kbd>
|
||||
<samp>{'__abstractmethods__': frozenset(),
|
||||
'__delitem__': <function __delitem__ at 0x00DCB6A8>,
|
||||
'__dict__': <attribute '__dict__' of 'OrderedDict' objects>,
|
||||
'__doc__': None,
|
||||
'__eq__': <function __eq__ at 0x00DD2930>,
|
||||
'__hash__': None,
|
||||
'__init__': <function __init__ at 0x00DC41E0>,
|
||||
'__iter__': <function __iter__ at 0x00DCB618>,
|
||||
'__module__': 'ordereddict',
|
||||
'__reduce__': <function __reduce__ at 0x00DCB6F0>,
|
||||
'__repr__': <function __repr__ at 0x00DCB8E8>,
|
||||
'__reversed__': <function __reversed__ at 0x00DCB660>,
|
||||
'__setitem__': <function __setitem__ at 0x00DCB5D0>,
|
||||
'__weakref__': <attribute '__weakref__' of 'OrderedDict' objects>,
|
||||
'_abc_cache': <_weakrefset.WeakSet object at 0x00DCF950>,
|
||||
'_abc_negative_cache': <_weakrefset.WeakSet object at 0x00DCF990>,
|
||||
'_abc_negative_cache_version': 12,
|
||||
'_abc_registry': <_weakrefset.WeakSet object at 0x00DCF910>,
|
||||
'clear': <function clear at 0x00DCB7C8>,
|
||||
'copy': <function copy at 0x00DD28A0>,
|
||||
'fromkeys': <classmethod object at 0x00DCF8F0>,
|
||||
'items': <function items at 0x00D60150>,
|
||||
'keys': <function keys at 0x00D60108>,
|
||||
'pop': <function pop at 0x00D60978>,
|
||||
'popitem': <function popitem at 0x00DCB780>,
|
||||
'setdefault': <function setdefault at 0x00D60A98>,
|
||||
'update': <function update at 0x00D60A50>,
|
||||
'values': <function values at 0x00D60198>}</samp></pre>
|
||||
<ol>
|
||||
<li>FIXME
|
||||
</ol>
|
||||
|
||||
<p class=a>⁂
|
||||
|
||||
<h2 id=implementing-fractions>Implementing Fractions</h2>
|
||||
|
||||
<p class=nav><a rel=prev class=todo><span>☜</span></a> <a rel=next class=todo><span>☞</span></a>
|
||||
|
||||
Reference in New Issue
Block a user