mirror of https://github.com/mahmoud/boltons.git
funcutils independent Python 3 compat
This commit is contained in:
parent
d60418ebf0
commit
21313c81b5
|
@ -10,7 +10,6 @@ import sys
|
||||||
import functools
|
import functools
|
||||||
from types import MethodType, FunctionType
|
from types import MethodType, FunctionType
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from six import iteritems
|
|
||||||
|
|
||||||
|
|
||||||
def get_module_callables(mod, ignore=None):
|
def get_module_callables(mod, ignore=None):
|
||||||
|
@ -50,8 +49,8 @@ def mro_items(type_obj):
|
||||||
['denominator', 'imag', 'numerator', 'real']
|
['denominator', 'imag', 'numerator', 'real']
|
||||||
"""
|
"""
|
||||||
# TODO: handle slots?
|
# TODO: handle slots?
|
||||||
return chain.from_iterable([iteritems(ct.__dict__)
|
return chain.from_iterable(ct.__dict__.items()
|
||||||
for ct in type_obj.__mro__])
|
for ct in type_obj.__mro__)
|
||||||
|
|
||||||
|
|
||||||
def dir_dict(obj, raise_exc=False):
|
def dir_dict(obj, raise_exc=False):
|
||||||
|
|
Loading…
Reference in New Issue