You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
385 B
19 lines
385 B
from __future__ import absolute_import
|
|
|
|
import abc
|
|
|
|
|
|
class AbstractType(object):
|
|
__metaclass__ = abc.ABCMeta
|
|
|
|
@abc.abstractmethod
|
|
def encode(cls, value): # pylint: disable=no-self-argument
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def decode(cls, data): # pylint: disable=no-self-argument
|
|
pass
|
|
|
|
@classmethod
|
|
def repr(cls, value):
|
|
return repr(value)
|