mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-17 05:14:43 +02:00
...
This commit is contained in:
parent
f07ae77929
commit
0920b2cccb
1 changed files with 11 additions and 0 deletions
|
|
@ -129,6 +129,17 @@ def __setattr__(self, attr, val):
|
|||
fobject = object.__getattribute__(self, 'fobject')
|
||||
return setattr(fobject, attr, val)
|
||||
|
||||
def __repr__(self):
|
||||
fobject = object.__getattribute__(self, 'fobject')
|
||||
name = object.__getattribute__(self, 'name')
|
||||
return repr(fobject).replace('>', ' name='+repr(name)+'>')
|
||||
|
||||
def __str__(self):
|
||||
return repr(self)
|
||||
|
||||
def __unicode__(self):
|
||||
return repr(self).decode('utf-8')
|
||||
|
||||
|
||||
m = mode[0]
|
||||
random = len(mode) > 1 and mode[1] == '+'
|
||||
|
|
|
|||
Loading…
Reference in a new issue