def block(self, something, block=True):
from .topic import Topic<EOL>if isinstance(something, Author):<EOL><INDENT>if something.url == self.url:<EOL><INDENT>return False<EOL><DEDENT>data = {<EOL>'<STR_LIT>': something.xsrf,<EOL>'<STR_LIT:action>': '<STR_LIT>' if block else '<STR_LIT>',<EOL>}<EOL>block_author_url = something.url + '<STR_LIT>'<EOL>res = self._session.post(block_author_url, data=data)<EOL>return res.json()['<STR_LIT:r>'] == <NUM_LIT:0><EOL><DEDENT>elif isinstance(something, Topic):<EOL><INDENT>tid = something.tid<EOL>data = {<EOL>'<STR_LIT>': something.xsrf,<EOL>'<STR_LIT>': '<STR_LIT>' if block else '<STR_LIT>',<EOL>'<STR_LIT>': tid,<EOL>}<EOL>block_topic_url = '<STR_LIT>'<EOL>res = self._session.post(block_topic_url, data=data)<EOL>return res.status_code == <NUM_LIT:200><EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>
屏蔽某个用户、话题

        :param Author/Topic something:
        :param block: True-->屏蔽，False-->取消屏蔽
        :return: 成功返回 True，失败返回 False
        :rtype: bool