-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get_emoticons function should return dict instead of set
- Loading branch information
1 parent
c8280da
commit 13a83e5
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will fail some of the time. Consider the text
"This is my code :] x = text[2:]"
. This will return a count of 2 for the smiley:]
even though one of the smileys is part of some code.What about something like
You could also accept strings or lists as an argument, and if it's a list then you don't need to split it. Something to think about as we have
Post.text.words
which is a tokenised list of words.