Add some more aliases.
This commit is contained in:
@@ -277,6 +277,8 @@ class Sequence(Positional):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Seq = Sequence
|
||||||
|
|
||||||
class String(object):
|
class String(object):
|
||||||
""" A type representing a Unicode string """
|
""" A type representing a Unicode string """
|
||||||
def __init__(self, encoding='utf-8'):
|
def __init__(self, encoding='utf-8'):
|
||||||
@@ -297,6 +299,8 @@ class String(object):
|
|||||||
def deserialize(self, struct, value):
|
def deserialize(self, struct, value):
|
||||||
return self._validate(struct, value)
|
return self._validate(struct, value)
|
||||||
|
|
||||||
|
Str = String
|
||||||
|
|
||||||
class Integer(object):
|
class Integer(object):
|
||||||
""" A type representing an integer """
|
""" A type representing an integer """
|
||||||
def _validate(self, struct, value):
|
def _validate(self, struct, value):
|
||||||
@@ -361,6 +365,8 @@ class Structure(object):
|
|||||||
def add(self, struct):
|
def add(self, struct):
|
||||||
self.structs.append(struct)
|
self.structs.append(struct)
|
||||||
|
|
||||||
|
Struct = Structure
|
||||||
|
|
||||||
class _SchemaMeta(type):
|
class _SchemaMeta(type):
|
||||||
def __init__(cls, name, bases, clsattrs):
|
def __init__(cls, name, bases, clsattrs):
|
||||||
structs = []
|
structs = []
|
||||||
|
Reference in New Issue
Block a user