Exemplo n.º 1
0
 def __init__(self, partition_lengths, delimiter=None, *args, **kw):
     if isinstance(partition_lengths, (int, long)):
         partition_lengths = [partition_lengths]
     if not delimiter:
         delimiter = ''
     self.format = self.assembly_formatstring(partition_lengths, delimiter)
     self.regex = self.assembly_regex(partition_lengths, delimiter)
     self.partition_lengths, self.delimiter = partition_lengths, delimiter
     Regex.__init__(self, *args, **kw)
Exemplo n.º 2
0
 def __init__(self, partition_lengths, delimiter = None,
              *args, **kw):
     if type(partition_lengths) == type(1):
         partition_lengths = [partition_lengths]
     if not delimiter:
         delimiter = ''
     self.format = self.assembly_formatstring(partition_lengths, delimiter)
     self.regex = self.assembly_regex(partition_lengths, delimiter)
     (self.partition_lengths, self.delimiter) = (partition_lengths, delimiter)
     Regex.__init__(self, *args, **kw)
Exemplo n.º 3
0
 def __init__(self, partition_lengths, delimiter=None,
              *args, **kw):
     if isinstance(partition_lengths, (int, long)):
         partition_lengths = [partition_lengths]
     if not delimiter:
         delimiter = ''
     self.format = self.assembly_formatstring(partition_lengths, delimiter)
     self.regex = self.assembly_regex(partition_lengths, delimiter)
     self.partition_lengths, self.delimiter = partition_lengths, delimiter
     Regex.__init__(self, *args, **kw)