Skip to content

Commit

Permalink
Reordering a method definition
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Aug 12, 2017
1 parent 4bca093 commit 8f78d58
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions typepy/type/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ def validate(self):
"invalid value type: expected={}, actual={}".format(
self.typecode, type(self._data)))

def force_convert(self):
"""
:return: Converted value.
:raises typepy.TypeConversionError:
If the value cannot convert.
"""

return self.__converter.force_convert()

def convert(self):
"""
:return: Converted value.
Expand All @@ -126,6 +117,15 @@ def convert(self):
"failed to convert from {} to {}".format(
type(self._data).__name__, self.typename))

def force_convert(self):
"""
:return: Converted value.
:raises typepy.TypeConversionError:
If the value cannot convert.
"""

return self.__converter.force_convert()

def try_convert(self):
"""
:return: Converted value. |None| if failed to convert.
Expand Down

0 comments on commit 8f78d58

Please sign in to comment.