1 comment

[ 62.2 ms ] story [ 29.0 ms ] thread
Many times, you know the input and output of a procedure that you know must exist, but can't remember the name.

Methodfinder finds the name. Let me know if you find it useful!

   >>> import methodfinder
   >>> methodfinder.find([]) == 0
   len([])
   sum([])
   >>> methodfinder.find([]) == False
   any([])
   bool([])
   callable([])
   >>> methodfinder.find(3) == "3"
   ascii(3)
   format(3)
   repr(3)
   str(3)
   >>> methodfinder.find([1,2,6,7], 6) == True
   6 in [1, 2, 6, 7]
   [1, 2, 6, 7].__contains__(6)