登录
GitLink极速下载/pygtrie
同步镜像关注点赞复刻(Fork)
  • 主页
  • 代码库
  • 疑修(Issue)
  • 流水线(devops)
  • 里程碑
  • 维基(Wiki)
  • 动态
目录
master
分支2
标签10
+ 疑修
Web IDE
Waren Long

Add empty separator check and tests

str.split method does not accept an empty string as a separator:

>>> 'foo'.split('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: empty separator
>>>

Add an explicit test in the StringTrie constructor so we fail early when constructing the object.

(As an aside, str.split allows None as a separator. StringTrie could allow None separator but _key_from_path would have to be changed. If anyone needs that feature it’s fairly easy to implement).

[mina86@mina86.com: expanded commit message]

8年前66次提交
  • .gitignoreAdd Sphinx configuration and update docstrings.11年前
  • .pylintrcFix lint warnings9年前
  • .rtd-requirements.txtUse sphinxcontrib.napoleon to parse Google-style docs9年前
  • LICENSEInitial commit.12年前
  • MANIFEST.inRemove __init__.py9年前
  • README.rstFix Read The Docs badges and links9年前
  • conf.pyAdd more documentation and examples9年前
  • example.pyFix superfluous-parens lint warnings in example.py9年前
  • index.rstAdd note about naming incompatibility introduced by 1.0 release.10年前
  • pygtrie.pyAdd empty separator check and tests8年前
  • setup.pyFix installation failure on Windows9年前
  • test.pyAdd empty separator check and tests8年前
  • version-history.rstPrepare 2.2 release including Windows installation fixes9年前
  • version.pyFix version.py failing to read git version9年前
关于
python
README.md
213.0 KB
邀请码