Update: clarify inheritance behavior for class definition

Explicit is better than implicit.
This commit is contained in:
ssut 2015-07-17 20:52:32 +09:00
parent 6a101f4dad
commit 1230ace7b2
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
class Translated: class Translated(object):
""" """
The Translated object, which contains Google Translator's result. The Translated object, which contains Google Translator's result.
@ -22,7 +22,7 @@ class Translated:
return u'<Translated src={src} dest={dest} text={text} pronunciation={pronunciation}>'.format( return u'<Translated src={src} dest={dest} text={text} pronunciation={pronunciation}>'.format(
src=self.src, dest=self.dest, text=self.text, pronunciation=self.pronunciation) src=self.src, dest=self.dest, text=self.text, pronunciation=self.pronunciation)
class Detected: class Detected(object):
""" """
The detected object, which contains Google Translator's langauge detection result. The detected object, which contains Google Translator's langauge detection result.

View File

@ -172,7 +172,6 @@ Advanced usage:
return result return result
def get_languages(): def get_languages():
return LANGUAGES return LANGUAGES