def print_typedefs(self, w=0, **print3opts):
        '''Prints the types and dict tables.

        The available options and defaults are:

            *w=0* -- indentation for each line

            *print3opts* -- print keyword arguments, like Python 3.+
        '''
        for k in _all_kinds:
            # XXX Python 3.0 doesn't sort type objects
            t = [(self._prepr(a), v) for a, v in _items(_typedefs) if v.kind == k and (v.both or self._code_)]
            if t:
                self._printf('%s%*d %s type%s:  basicsize, itemsize, _len_(), _refs()',
                             linesep, w, len(t), k, _plural(len(t)), **print3opts)
                for a, v in sorted(t):
                    self._printf('%*s %s:  %s', w, '', a, v, **print3opts)
        # dict and dict-like classes
        t = sum(len(v) for v in _values(_dict_classes))
        if t:
            self._printf('%s%*d dict/-like classes:', linesep, w, t, **print3opts)
            for m, v in _items(_dict_classes):
                self._printf('%*s %s:  %s', w, '', m, self._prepr(v), **print3opts)
Prints the types and dict tables.

        The available options and defaults are:

            *w=0* -- indentation for each line

            *print3opts* -- print keyword arguments, like Python 3.+
        
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py