|
LibInsult - Python
|
A list of insulting words of some kind. More...
Public Member Functions | |
| def | __init__ (self, id, words=[]) |
| def | add_word (self, word) |
| Appends a word to the list. More... | |
| def | get (self, max_count=1, min_count=None) |
| Retrieves a random subset of words. More... | |
| def | check_flags (self, flags) |
| Checks if the flags match. More... | |
Public Attributes | |
| name | |
| Name of the word list. More... | |
| words | |
| Set of words in the list. More... | |
| flags | |
| Flags fot the set of words. More... | |
| def insult.WordList.__init__ | ( | self, | |
| id, | |||
words = [] |
|||
| ) |
| id | A WordListId (expanded with word_list_id()) |
| words | An iterable containing words to add to the list |
| def insult.WordList.add_word | ( | self, | |
| word | |||
| ) |
| def insult.WordList.check_flags | ( | self, | |
| flags | |||
| ) |
| def insult.WordList.get | ( | self, | |
max_count = 1, |
|||
min_count = None |
|||
| ) |
Retrieves a random subset of words.
| max_count | Maximum number of words to return |
| min_count | Minimum number of words to return, if omitted, returns exactly max_count words |
Definition at line 48 of file insult.py.
Referenced by insult.Insulter.format().
| insult.WordList.flags |
Flags fot the set of words.
Definition at line 40 of file insult.py.
Referenced by insult.WordListId.check().
| insult.WordList.name |
Name of the word list.
Definition at line 35 of file insult.py.
Referenced by insult.WordListId.check().
| insult.WordList.words |
Set of words in the list.
Definition at line 37 of file insult.py.
Referenced by insult.WordList.get().
1.8.11