Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_chat.py @ 156:826e7b17a19b
chat: added __unicode__ and __str__
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Apr 2018 17:36:02 +0200 |
parents | 654b00fa3fdc |
children | 0ddd2b20cc6b |
comparison
equal
deleted
inserted
replaced
155:a0e486074d91 | 156:826e7b17a19b |
---|---|
222 # completion attribtues | 222 # completion attribtues |
223 self._hi_comp_data = None | 223 self._hi_comp_data = None |
224 self._hi_comp_last = None | 224 self._hi_comp_last = None |
225 self._hi_comp_dropdown = DropDown() | 225 self._hi_comp_dropdown = DropDown() |
226 self._hi_comp_allowed = True | 226 self._hi_comp_allowed = True |
227 | |
228 def __unicode__(self): | |
229 return u"Chat({})".format(self.target) | |
230 | |
231 def __str__(self): | |
232 return self.__unicode__().encode('utf-8') | |
233 | |
234 def __repr__(self): | |
235 return self.__str__() | |
227 | 236 |
228 @classmethod | 237 @classmethod |
229 def factory(cls, plugin_info, target, profiles): | 238 def factory(cls, plugin_info, target, profiles): |
230 profiles = list(profiles) | 239 profiles = list(profiles) |
231 if len(profiles) > 1: | 240 if len(profiles) > 1: |