A pointless class, for sanity-checking of docstring testing.
Methods:
square()
get()
>>> _TestClass(13).get() + _TestClass(-12).get()
1
>>> hex(_TestClass(13).square().get())
0xa9
Example Usage
Methods
|
|
__init__
get
square
|
|
__init__
|
__init__ ( self, val )
val -> _TestClass object with associated value val.
>>> t = _TestClass(123)
>>> print t.get()
123
|
|
get
|
get ( self )
get() -> return TestClass's associated value.
>>> x = _TestClass(-42)
>>> print x.get()
-42
|
|
square
|
square ( self )
square() -> square TestClass's associated value
>>> _TestClass(13).square().get()
169
|
|