Django Book 翻译
菜单>:
TOC
返回
原文:
* The ``token.split_contents()`` method separates the arguments on spaces while keeping quoted strings together. Avoid using ``token.contents.split()`` (which just uses Pythons standard string-splitting semantics). Its not as robust, as it naively splits on *all* spaces, including those within quoted strings.
翻译:
* ``token.split_contents()`` 方法按空格拆分参数同时保证引号中的字符串在一起。应该避免使用 ``token.contents.split()`` (仅是使用Python的标准字符串拆分),它不够健壮,因为它只是简单的按照 *所有* 空格进行拆分,包括那些引号引起来的字符串中的空格。
备注:
译者: