Skip to content

Commit 423c28e

Browse files
authored
Merge pull request #7 from tna0y/master
types.CodeType docstring
2 parents aa3a266 + 274865d commit 423c28e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ Recognized that the != inequality operator in Python 3.0 was a horrible, finger
160160
```
161161
A hash is a fixed sized integer that identifies a particular value. On a closer look, the hash of infinity is 10^5 x pi. Interestingly, hash(float('-inf')) yields -10^5 x pi in python3, whereeas -271828 i.e - 10^5 x e in python2.
162162

163+
### 14. types.CodeType - Not for the faint of heart
164+
If you start digging deep into Python's internals you will get a warning in `help` output for `types.CodeType`
165+
```py
166+
>>> import types
167+
>>> help(types.CodeType)
168+
...
169+
Help on class code in module builtins:
170+
171+
class code(object)
172+
| code(argcount, kwonlyargcount, nlocals, stacksize, flags, codestring,
173+
| constants, names, varnames, filename, name, firstlineno,
174+
| lnotab[, freevars[, cellvars]])
175+
|
176+
| Create a code object. Not for the faint of heart.
177+
|
178+
| Methods defined here:
179+
|
180+
...
181+
```
182+
163183
## Notes
164184
1. Easiest hello world program in a language without calling any function
165185
2. Each and every line is the philosophy of Python's design and is a supreme holy guide

0 commit comments

Comments
 (0)