Closed kshitij10496 closed 8 years ago
Ping @zorroblue ! Since @Arafatk is working on #2 , it would be good if you can contribute on this issue.
Reply to @Arafatk comment here
Another simple way would be to use a deque and set it maxlen parameter(and break when deque size reaches maxlen). Although I am not sure if its 'better'.
Deque has better performance than list for operations like pop
. Reference
However, I feel it would be an overkill for this task.
Also, another thing to note is that deque doesn't support slicing.
So, I would prefer to use a list here. A length check should work fine.
Currently, the number of users returned by the function
search_location
exceeds the limit set bymax_users
. We need to implement this restriction.