File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1599,6 +1599,51 @@ to display that server::
15991599
16001600(Contributed by Ron Adam; :issue: `2001 `.)
16011601
1602+ dis
1603+ ---
1604+
1605+ The :mod: `dis ` module gained two new functions for inspecting code,
1606+ :func: `~dis.code_info ` and :func: `~dis.show_code `. Both provide detailed code
1607+ object information for the supplied function, method, source code string or code
1608+ object. The former returns a string and the latter prints it::
1609+
1610+ >>> import dis, random
1611+ >>> show_code(random.choice)
1612+ Name: choice
1613+ Filename: /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/random.py
1614+ Argument count: 2
1615+ Kw-only arguments: 0
1616+ Number of locals: 3
1617+ Stack size: 11
1618+ Flags: OPTIMIZED, NEWLOCALS, NOFREE
1619+ Constants:
1620+ 0: 'Choose a random element from a non-empty sequence.'
1621+ 1: 'Cannot choose from an empty sequence'
1622+ Names:
1623+ 0: _randbelow
1624+ 1: len
1625+ 2: ValueError
1626+ 3: IndexError
1627+ Variable names:
1628+ 0: self
1629+ 1: seq
1630+ 2: i
1631+
1632+ (Contributed by Nick Coghlan in :issue: `9147 `.)
1633+
1634+ dbm
1635+ ---
1636+
1637+ All database modules now support :meth: `get ` and :meth: `setdefault ` are now
1638+ available in all database modules
1639+
1640+ (Suggested by Ray Allen in :issue: `9523 `.)
1641+
1642+ ctypes
1643+ ------
1644+
1645+ A new type, :class: `ctypes.c_ssize_t ` represents the C :c:type: `ssize_t ` datatype.
1646+
16021647sysconfig
16031648---------
16041649
You can’t perform that action at this time.
0 commit comments