mirror of https://github.com/dirtbags/netarch.git
Another fix for changed __init__
This commit is contained in:
parent
a35f21d28a
commit
36290068ab
|
@ -15,6 +15,7 @@ class GapString:
|
||||||
self.length = 0
|
self.length = 0
|
||||||
self.drop = drop
|
self.drop = drop
|
||||||
if init:
|
if init:
|
||||||
|
print init
|
||||||
self.append(init)
|
self.append(init)
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
@ -98,7 +99,7 @@ class GapString:
|
||||||
if isinstance(other, str):
|
if isinstance(other, str):
|
||||||
self.append(other)
|
self.append(other)
|
||||||
else:
|
else:
|
||||||
new = self.__class__(self.drop)
|
new = self.__class__(drop=self.drop)
|
||||||
new.extend(self)
|
new.extend(self)
|
||||||
new.extend(other)
|
new.extend(other)
|
||||||
return new
|
return new
|
||||||
|
@ -108,7 +109,7 @@ class GapString:
|
||||||
mask = [mask]
|
mask = [mask]
|
||||||
masklen = len(mask)
|
masklen = len(mask)
|
||||||
|
|
||||||
new = self.__class__(self.drop)
|
new = self.__class__(drop=self.drop)
|
||||||
for i in self.contents:
|
for i in self.contents:
|
||||||
if isinstance(i, int):
|
if isinstance(i, int):
|
||||||
new.append(i)
|
new.append(i)
|
||||||
|
|
Loading…
Reference in New Issue