websockets Documentation Release 9.0
notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of websockets nor the names of its contributors to cover creators and users in case something goes wrong. You always have a 100% up-to- date bill of materials for your dependencies to share with your legal team, customers, or partners. • Maintenance0 码力 | 81 页 | 352.88 KB | 1 年前3Python 标准库参考指南 2.7.18
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." For 8-bit strings, this method is locale-dependent. str.translate(table[ abstract syntax tree from the concrete tree. The transformer module was created by Greg Stein and Bill Tutt for an experimental Python-to-C compiler. The current version contains a number of modifications0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." For 8-bit strings, this method is locale-dependent. str.translate(table[ abstract syntax tree from the concrete tree. The transformer module was created by Greg Stein and Bill Tutt for an experimental Python-to-C compiler. The current version contains a number of modifications0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." For 8-bit strings, this method is locale-dependent. str.translate(table[ abstract syntax tree from the concrete tree. The transformer module was created by Greg Stein and Bill Tutt for an experimental Python-to-C compiler. The current version contains a number of modifications0 码力 | 1552 页 | 7.42 MB | 9 月前3Objeet Oriented Python Tutorial
4: 'Operating System'} >>> my_dict['Bill Gates'] = 'Owner' >>> my_dict {1: 'msft', 2: 'Software', 3: 'Microsoft Technologies', 4: 'Operating System', 'Bill Gates': 'Owner'} From the above code 'msft', 2: 'Software', 3: 'Microsoft Technologies', 4: 'Operating System', 'Bill Gates': 'Owner'} >>> >>> del my_dict['Bill Gates'] >>> my_dict {1: 'msft', 2: 'Software', 3: 'Microsoft Technologies'0 码力 | 111 页 | 3.32 MB | 1 年前3Python 标准库参考指南 3.6.15
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." str.translate(table) 返 回 原 字 符 串 的 副 本, 其 中 每 个 字 符 按 给 定 的 转 换 表 进 行 映 bytearray, memoryview 59 The Python Library Reference, 发布 3.6.15 >>> b"they're bill's friends from the UK".title() b"They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s):0 码力 | 1886 页 | 8.95 MB | 9 月前3Python 标准库参考指南 3.6.15
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." str.translate(table) 返 回 原 字 符 串 的 副 本, 其 中 每 个 字 符 按 给 定 的 转 换 表 进 行 映 bytearray, memoryview 59 The Python Library Reference, 发布 3.6.15 >>> b"they're bill's friends from the UK".title() b"They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s):0 码力 | 1886 页 | 8.95 MB | 9 月前3Python 标准库参考指南 3.7.13
视为单词。该定义在多数情况下都很 有效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." str.translate(table) 返回原字符串的副本,其中每个字符按给定的转换表进行映射。转换表必须是一个使用 __getitem__() 为单词。该定义在多数情况下都很 有效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> b"they're bill's friends from the UK".title() b"They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s):0 码力 | 1846 页 | 9.09 MB | 9 月前3Python 标准库参考指南 3.7.13
视为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): group(0)[0].upper() + ... mo.group(0)[1:].lower(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." str.translate(table) 返 回 原 字 符 串 的 副 本, 其 中 每 个 字 符 按 给 定 的 转 换 表 进 行 映 为单词。该定义在多数情况下都很有 效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> b"they're bill's friends from the UK".title() b"They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s):0 码力 | 1961 页 | 9.14 MB | 9 月前3Python 标准库参考指南 3.8.20
视为单词。该定义在多数情况下都很 有效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s): +)?", ... lambda mo: mo.group(0).capitalize(), ... s) ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." str.translate(table) 返回原字符串的副本,其中每个字符按给定的转换表进行映射。转换表必须是一个使用 __getitem__() 为单词。该定义在多数情况下都很 有效,但它也意味着代表缩写形式与所有格的撇号也会成为单词边界,这可能导致不希望的结果: >>> b"they're bill's friends from the UK".title() b"They'Re Bill'S Friends From The Uk" 可以使用正则表达式来构建针对撇号的特别处理: >>> import re >>> def titlecase(s):0 码力 | 1927 页 | 9.69 MB | 9 月前3
共 121 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13