simple.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:filters 作者: eflglobal 项目源码 文件源码
def _apply(self, value):
        if len(value) < self.min_length:
            #
            # Note that we do not pad the value:
            #   - It is not clear to which end(s) we should add the
            #     padding.
            #   - It is not clear what the padding value(s) should be.
            #   - We should keep this filter's behavior consistent with
            #     that of MaxLength.
            #
            return self._invalid_value(
                value   = value,
                reason  = self.CODE_TOO_SHORT,

                template_vars = {
                    'length':       len(value),
                    'min':          self.min_length,
                },
            )

        return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号