提交 c9267121 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed default value for strict in filter(), for consistency purpose

上级 99536643
...@@ -25,7 +25,7 @@ class MyType(Type): ...@@ -25,7 +25,7 @@ class MyType(Type):
def __repr__(self): def __repr__(self):
return str(self.thingy) return str(self.thingy)
def filter(self, x, strict=True, allow_downcast=None): def filter(self, x, strict=False, allow_downcast=None):
# Dummy filter: we want this type to represent strings that # Dummy filter: we want this type to represent strings that
# start with `self.thingy`. # start with `self.thingy`.
assert isinstance(x, str) and x.startswith(self.thingy) assert isinstance(x, str) and x.startswith(self.thingy)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论