fix crash on memoizing partial

functools.partial objects don't have __module__ or __name__

this is arguably a problem with functools, but accomodate it
anyway.