kenkov / kovot

Python Chatbot Framework
MIT License
4 stars 1 forks source link

Fix the behavior of `ResponseSelector.select` without `num` argument. #10

Closed kazh98 closed 5 years ago

kazh98 commented 5 years ago

The docstring of ResponseSelector.select states that the number of elements contained in a returned list is limited to 10 when the num argument is not given explicitly. However, current implementation of ResponseSelector.select returns a list whose number of elements is unlimited.

This pull request fixes the above problem and lets ResponseSelector.select behaves expectedly.

kenkov commented 5 years ago

Thanks for your PR. I made a mistake in the document you refered to. The default code is what I intended - if num == None, then it returns all the responses.

I fixed the document in 0d17ff2 .

kazh98 commented 5 years ago

I see! Thanks.