Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion multipledispatch/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,14 @@ def reorder(self, on_ambiguity=ambiguity_warn):
on_ambiguity(self, amb)
return od

def arg_types(self, args):
"""Determine of types of the arugments.
Could be overrided to better support metaclasses.
"""
return tuple([type(arg) for arg in args])

def __call__(self, *args, **kwargs):
types = tuple([type(arg) for arg in args])
types = self.arg_types(args)
try:
func = self._cache[types]
except KeyError:
Expand Down