% S! T( x& M$ p$ ~; @a = 'python' R# @! y' A% ~. i6 E; m
b = "python"5 m$ N# T! P" h+ O
c = '''python'''/ m" v5 b2 m& M f8 Y4 ^* t
print(a, id(a))2 W2 z% ~) ] c' p0 b! ^( {; }- q4 z
print(b, id(b))) u! X5 Q. E* A, Q% t! h
print(c, id(c)); y7 ^+ P. h! R: I& h
1$ w+ w& h% D5 H
2" s K- ~+ Z) ~4 n S
3 $ `3 r8 t, |/ j4 U# j/ x48 ~# ^. D. l% l2 l* ?+ e* r/ f0 r
5# F1 W% H* `% Y9 Q
6- `0 p! z& z! K0 O
7 0 s1 c2 l: B& ~3 {8 1 A; O/ D6 R$ ]+ h5 U% \! t9 ! R$ m% _+ b% P9 Y& L' U10 ( J6 L( |6 z# p j11" V# p8 \6 Y% f, g
125 R0 [1 @. H: V; _& h `* L# z4 Z
13 . s$ q) [2 q- q% z/ i# i 0 d! k3 n! ^' l! H$ d' o+ Y( w# K% _& e1 ]+ \$ P
3.字符串驻留机制的几种情况(交互式) & |$ r& ^) {9 y- x字符串的长度为1 / j" j# v9 e- O1 b( c- i' a符合标识符的字符串(只包含字母,数字,下划线)5 v' l( Q" T3 j
字符串只在编译是进行驻留,而非运行时7 H: a3 G: c# J
[-5,256]之间的整数数字 ! d$ F* D p2 b8 c9 L6 k! w>>> s1 = '' ! R" ^* a& e9 S& l) \>>> s2 = '' 5 h- K# U: v- `6 q4 j8 w/ }>>> s1 is s26 m& R2 f7 P# C( m' \) t
True' \4 e6 X! b) c9 R+ U. K
>>>9 D1 }- z" u5 f. d$ ^
>>> s1 = 'a'* o& J/ Q! m) L/ i
>>> s2 = 'a'' V5 ?/ B, e6 f3 ]9 C6 V9 T
>>> s1 is s2& ?) w8 \6 L( }
True& n% `+ k% j* i. `$ T
>>>" W3 c+ x: F. s
>>> s1 = 'abc_def'' u0 w5 D+ i! S5 r! c+ @5 l
>>> s2 = 'abc_def' {/ O# x9 y: ]
>>> s1 is s2 " A" U" o7 E3 m+ h5 p( UTrue6 T3 C6 m5 W8 j7 T
>>> s1 = 'abc%def' ) \' ]9 h0 I' A U4 Z$ e5 Q0 \>>> s2 = 'abc%def') \* [. U. o+ p6 J
>>> s1 == s2 & h$ n5 x, ~3 z/ O8 v- j. f4 j( FTrue2 K$ T) P6 [; w& u
>>> s1 is s2' F6 P, Q9 x) f6 u/ U5 T
False ' I! C' z- s0 O0 u>>>' j# i' s& B/ s7 z5 ]
>>> a = 2563 G! L! |( m2 L8 C
>>> b = 2568 |0 L/ s& Z: J4 p+ Y( d
>>> a is b2 b; Q+ J5 p! r( @4 U0 [8 p- n
True) u. D8 I2 r% H( y' M# F9 V
>>> a = 257 7 a4 ?& |% l* V/ ^$ \/ y>>> b = 257 ! k1 G, l2 o' g>>> a is b' `; I. k* f+ [" v
False 7 M8 J3 m# P( \( W0 `8 c>>> a == b7 b _; C. T, w. L/ b/ t" M
True - M- F. w }! o Q% W; v+ e>>> G7 p- _" Y$ ^: [) Q% O7 {- n# @, w7 a1 S( o3 ~, V( i `
1% g! o, ?6 j+ q( x" Z: @5 _
2, J3 V' k8 ^+ B" C
3 $ Y- U" r0 |+ B/ f4 + A* R/ }. f3 J# e# f0 n5 l* E: _% L9 V4 `) c# f9 y67 t9 \8 Q8 _( L1 z! Z/ d2 ~, I% U* B
7* G5 `: Z; Q# k$ a9 ^; `
8 , n% I Z8 i: p Q8 i& o5 |9. L& R- K/ l0 H$ @/ e! y
10 , J! Q' O5 j3 o) S" N11( _: ]# Q: t, T
12 4 F; ^# G& }8 @( z3 R z3 k136 x4 q6 k& p; z+ \
14# ?0 |7 T$ q; N" t8 B ?
15$ E0 S2 {+ `# [
166 o: O1 _' N! F$ {
17/ y) x2 E) n- y# w+ M/ {; {( N
180 H. E; B/ `0 k+ g m7 a3 ~
197 y, }0 R' {* _
20 - D! R0 O; y7 N) Z0 O: a3 U21 ) {. W7 v* o! L p6 |6 a22& l# u3 w' D. E6 p& _9 r* }
23/ q9 E! O! {4 z+ r
24# U3 Z5 V: V4 ^7 H3 `% c* I3 ~
258 ~" J: o8 S; h# B
26& F0 a7 i7 X1 _- N- S! n @" R5 u
27, G3 T; o& ~" W2 h
28$ N( B4 y C% B2 t
29 6 n+ a, `0 q! i' a30 6 R! O) d: V) Z% V! X4 E$ b% D' A31! u* g9 m# S N5 ^2 l' C& K; ]1 P2 X* l
327 M: j# d& J9 k& E
4.强制2个字符串指向同一个对象! ?4 M2 h* R( k" W0 q/ U# m
sys中的intern方法强制两个字符串指向同一个对象 5 \& {) x7 E! w: }. w, v3 w6 i0 k* ?+ L
'''sys中的intern方法强制两个字符串指向同一个对象''' . S* a; P, r) d8 G3 b5 ^import sys 7 j3 {; E3 W* M& ea = 'abc%'0 H$ D3 c% I4 e2 X5 v% s8 d' e
b = 'abc%' ' y& X5 J8 Q# C+ H) `& jprint(a is b) # True 5 t [) Z8 a1 xa = sys.intern(b)/ Y. j2 W3 M# v4 \
print(id(a), id(b)) # 2989905230512 2989905230512 8 w. H2 |' l1 E+ Y$ \% H& k" B% _, m q
1 " K! M# \9 V1 o9 \20 S" q" Q7 ^- b* k9 L
33 R& R& A# z, z* E# u% p, Y5 u, K1 r
4. d4 q# |( `3 i- ]
5 & e' L$ a; D$ ]+ Y0 f- i. y! |8 s6 ! v8 u6 ?# c4 p: W' g7 8 ^$ P- N. ~& X! W9 A m$ ]8& a, Y' F4 u. G5 P1 V: t H+ v
5. PyCharm对字符串进行了优化处理 / R; K' d6 ]1 e' E8 F) K4 Z6.字符串驻留机制的优缺点 6 q9 T, k- r9 }& r 当需要值相同的字符串时,可以直接从字符串池里拿来使用,避免频繁的创建和销毁,提升效率和节约内存,因此拼接字符串和修改字符串是会比较影响性能的。 0 @9 v9 X! M: h+ I ( o. m. i% n. L7 O' Q( ]8 | 在需要进行字符串拼接时建议使用 str类型的join方法,而非+ ,因为join()方法是先计算出所有字符中的长度,然后再拷贝,只new一次对象,效率要比"+"效率高 。 6 G9 M+ g6 U1 C" ^0 V6 A: x; q. c" V5 C6 w- v
二、字符串类型的操作1 b* A2 W3 S) v D7 ^$ }
Python类str内置源码: m3 e% D0 `5 L* E' x
, `! m2 _: [/ ]5 Q+ v0 H
class str(object):/ Y9 O- k$ N, h& I/ w" l; h& R
""" 5 x$ ]+ H3 A6 |$ h( S; O& I str = "(对象)——> str % \0 f0 s5 m0 P: t . \8 X. e1 m( q8 Q. @1 \ Str (bytes_or_buffer[, encoding[, errors]]) -> Str ! W. j0 B# H3 ~" p6 B 6 A* c. W% D. s) K: x* s
从给定的对象创建一个新的字符串对象。如果编码或,则对象必须公开数据缓冲区 ) T, Z( i: B0 C J/ H2 ]% J4 @) W3 t 将使用给定的编码和错误处理程序进行解码。/ c. D, S/ f V* a; }# E1 A; x/ l* f
/ W) H% m4 D3 D) ]! H% k 否则,返回object.__str__()的结果(如果已定义)或repr(对象)。/ u5 H. e; ?, u- N; G3 Z6 B8 m+ k
+ P3 C/ ~0 l2 x! X 编码默认为sys.getdefaultencoding()。 ( [3 C7 r/ y& \; M+ A) J# O3 \ 2 s) s1 n- H4 y1 C Errors默认为'strict'。. a( n! }2 [7 B5 Z# s: L% d; L
""" 2 A/ z( @ ]& `4 r2 s; K def capitalize(self, *args, **kwargs): # real signature unknown$ J: ]6 `2 c1 W
""" w) P5 |+ r/ u8 [( k
Return a capitalized version of the string. ) i- q# y& l# J8 ]- ^) L4 Z, e/ l& v2 i" f0 t
More specifically, make the first character have upper case and the rest lower 6 C* b0 k7 L+ [5 J3 U case. 8 D2 W# [5 ?/ U$ a3 @0 T """ l2 f2 h( ], U3 ~/ D
pass8 k! [, Q0 o, x, z
, c/ X. B# D {; M4 _" e t* k% @2 I def casefold(self, *args, **kwargs): # real signature unknown 5 p- l4 J* b. |$ l """ Return a version of the string suitable for caseless comparisons. """ - q2 k0 h |0 D' M) j pass! |1 z9 ^7 E [; T1 e
* ] V4 K2 h/ |3 a0 v! `8 ~5 Z5 M def center(self, *args, **kwargs): # real signature unknown; S: Z" i/ y% ]. p
""" 9 t3 M, K4 N# Z4 c+ d 返回一个居中长度为width的字符串。 ; m5 ]3 \7 Y0 I# ~ ' o5 p: G: u* m* [3 C; P/ z$ `6 K3 u 使用指定的填充字符(默认为空格)填充。 3 L, O$ Y& p! Z3 X, Q R- ^3 t0 k """( E3 @ V M$ r
pass4 N# [' g2 V7 F/ k
+ z7 G( {. z, j+ Y, q7 D
def count(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ 4 p- w: d' }: ` E6 D+ ]# j4 G """ ' N: f$ |3 U; ]5 f+ [6 I# L4 s4 v S.count(sub[, start[, end]]) -> $ M: e6 v3 @$ H' E % t: m6 D) w( r* E6 B; m4 | int .count(sub[, start[, end]]返回子字符串sub in不重叠出现的次数 0 h) m- d2 C6 ~; z4 ^0 ?1 a6 b# r
字符串(开始:结束)。可选参数start和end是用切片表示法解释。 + I4 A9 v. n$ E) \1 c2 o$ k V) i """+ x: _$ y$ P! Y) J5 M
return 05 e5 N$ A' F( w. y* c: n, ` q
# Z1 i, I' j- b# F def encode(self, *args, **kwargs): # real signature unknown ' b% d" n( l2 z% e9 _- b """ + j5 L. z* [0 T/ x# N; v Encode the string using the codec registered for encoding.& q4 {5 x' h9 d
8 b& V/ H9 p+ M encoding : }2 B/ B) c: T; d! ?& s) p* z The encoding in which to encode the string.. O0 c, ~( r# I
errors- G B7 k. w, w1 R$ { t8 P6 [1 G+ O9 g
The error handling scheme to use for encoding errors. $ [9 e" O2 @- c& Y" _1 L. f& H' A The default is 'strict' meaning that encoding errors raise a ; B: c7 f1 d* E, M, Z1 L UnicodeEncodeError. Other possible values are 'ignore', 'replace' and ( F+ [5 Y7 r5 o& V$ F 'xmlcharrefreplace' as well as any other name registered with $ c% {) F# z* K" @6 y codecs.register_error that can handle UnicodeEncodeErrors. 7 J7 G' z% ]. S1 w+ _" y* m8 V# J! ^1 _( S$ U9 L6 Q
使用注册用于编码的编解码器对字符串进行编码。 ( z U7 V9 F* X8 g4 S6 @# `1 C* V }7 t0 o% V% M
编码 ( b! A- b5 j- s, l 用于编码字符串的编码方式。& m# m. v; K- N! s& M+ W7 I
错误& p3 [. d' }8 r0 O) S
用于编码错误的错误处理方案。* b+ l: O% u* Q% j
默认值是'strict',意味着编码错误会引发UnicodeEncodeError。 M6 r. Q# s% v; V7 E& m' J
其他可能的值有'ignore', 'replace'和'xmlcharrefreplace'以及注册的任何其他名称编解码器。 % ^% M; {8 j: h, @7 e \2 q* U- i 可以处理UnicodeEncodeErrors的register_error。 + `' H. Q" ]$ Y' R """# P! g! f& d' R$ H9 L h
pass # {* P. X0 b2 h7 o r7 E 6 H" V, f( l& h: w def endswith(self, suffix, start=None, end=None): # real signature unknown; restored from __doc__ & s* p# `- ~7 B """ 7 F( L) I! |# h S.endswith(suffix[, start[, end]]) -> bool 8 j) C7 z+ M+ y0 L; _ m" O6 X. _0 m) D: G R6 R5 P
Return True if S ends with the specified suffix, False otherwise.& T5 Y: R. B/ o
With optional start, test S beginning at that position. ! w* D# d' D1 n With optional end, stop comparing S at that position.: Z* ]! ?0 B& |3 h+ |
suffix can also be a tuple of strings to try.; Q5 Q8 T- X2 x+ k1 K" \& m ]. [
"""0 G' L' s S q/ `
return False" k3 I3 c/ I. Y; y
" E6 }/ q) H) x2 W, p Q
def expandtabs(self, *args, **kwargs): # real signature unknown) ~% T* G T$ R ]/ s- E: g
""") u$ d( }5 |, e# A3 K4 C1 O5 e% ~
Return a copy where all tab characters are expanded using spaces.! G5 \9 r% R; m, R0 B" p: @- u) y
) P% r% _6 l# \/ h$ d5 b If tabsize is not given, a tab size of 8 characters is assumed./ Z5 v# h+ p& X
"""( }4 |# X# S, H3 ?6 G
pass ! a4 x7 w" t; F* t% c# V: p9 E & z0 Q7 u* v. u s+ h& \( | def find(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ & }# b+ K0 a. q! }! S """ . i% z7 B. c( E& B4 V( K S.find(sub[, start[, end]]) -> int 6 r" l, w, a% R' u/ j P* f$ ?# z: J
Return the lowest index in S where substring sub is found, 5 H& m1 B8 _# F$ _ such that sub is contained within S[start:end]. Optional1 | F/ Q3 d8 m- X9 _1 m
arguments start and end are interpreted as in slice notation. & Z7 q8 U% ^( R/ Y/ w, ^% G# S2 g& g' y9 F" O1 S3 S! L
Return -1 on failure. 9 ~7 f. i" E" Z9 w- N2 ~: J6 r, l! t) ] i( y
S.find(sub[, start[, end]]) -> int& h1 u. p0 ~# T# X6 U1 o9 d J
; s6 |2 l4 r1 M, e4 U4 ~) y
返回S中找到子串sub的最低下标,这样,sub包含在S[start:end]中。 H3 \" T7 L2 Z6 P1 ^6 l& f1 X' O 可选参数start和end被解释为切片表示法。 8 a5 u7 |, J6 P! G 5 U! X# n1 R" Q, N! q 失败时返回-1。5 o- T- A, E+ \( P5 W% B, `3 A
) t; L! G$ q6 O) l: ^! A6 k """ - v: a1 T* I( w' X! Z, W return 03 X/ I8 q2 _7 i9 @8 N+ z R& ~3 i
) }* w# N2 e. l, a
def format(self, *args, **kwargs): # known special case of str.format ) H& r+ J, f# X4 n """ 2 V0 L# H k9 W* _, M S.format(*args, **kwargs) -> str4 u% Z- P, n) V9 X7 a
4 I) y# ~, k+ G- w Return a formatted version of S, using substitutions from args and kwargs.1 l8 s8 ?# J/ S5 [1 s: y% V" G" O/ q
The substitutions are identified by braces ('{' and '}').) o, y5 g7 r" z1 y5 ]# M
) {- g6 F0 K3 k6 c# V" u 使用args和kwargs的替换,返回S的格式化版本。6 U( W% y; n: o7 U: \
替换由大括号('{'和'}')标识。4 i2 H$ y% x3 e- f6 l% l2 ]! Q
""" / f, _8 d4 U d9 T3 }8 @3 I/ p& @ N' Y pass9 |5 \: H0 S/ I" `" p
2 u) _! M' {+ I def format_map(self, mapping): # real signature unknown; restored from __doc__ ! T1 I8 U. M8 _* O8 a """ 0 i3 C" x [# S5 D. e6 u S.format_map(mapping) -> str/ E' M- P( U! \5 N% |
) i9 t6 |2 v2 l* a) L
Return a formatted version of S, using substitutions from mapping. 8 p5 ]$ E W/ X, X( T3 y l The substitutions are identified by braces ('{' and '}').0 ^9 O; G$ x8 X3 X
"""- N, ]7 N7 Z$ V: X' y) r
return """ J9 g# j9 `4 m/ \
) ?5 o8 Q: w% ]& i4 W Return the lowest index in S where substring sub is found, 6 r |7 j! }$ R+ y0 m3 F such that sub is contained within S[start:end]. Optional 6 Q/ j4 P; d% y7 n- u* F2 { arguments start and end are interpreted as in slice notation. 4 c3 O$ ]. H4 k: |5 n" `1 v& t6 Y " b+ @6 u. X! G Raises ValueError when the substring is not found.1 a: H$ z* N7 x9 g- b% B
6 g* r8 P9 `0 R8 g5 @
S.index(sub[, start[, end]]) -> int * R a0 I; Q% [, @+ N; w
.index(sub[, start[, end]]# c) M+ b8 w- ^. c# T2 ?
+ Q# `. Y4 q, H& S# F 返回S中找到子串sub的最低下标,这样,sub包含在S[start:end]中。8 G5 }% f# F a# i" V9 B
可选参数start和end被解释为切片表示法。 ' v! M" M3 b$ x" \, _1 o , A" s! t; H z' J- K 当没有找到子字符串时引发ValueError。 & v4 I8 F: U/ S# q2 B """ % D$ z2 O: v+ h return 07 [2 D2 Y) T3 k1 }( F( W6 U
0 N6 N! |6 ?4 K2 ]
def isalnum(self, *args, **kwargs): # real signature unknown ! [( I) e3 ]0 E: d% z """8 g7 r& a& H: G
Return True if the string is an alpha-numeric string, False otherwise. , B3 y( j& O3 a: t+ P* \, S$ N 1 q4 Z8 @3 D3 U: Z0 ^5 U/ l A string is alpha-numeric if all characters in the string are alpha-numeric and/ X/ k6 s/ A7 [! M6 K
there is at least one character in the string.* n* ]; Z* S# H/ t2 p
""": L" Y1 B' ^! u# ~8 d; K
pass0 n" ~& o' U E6 ]$ P6 H
- X5 a% t* V3 d6 j) d% W7 _
def isalpha(self, *args, **kwargs): # real signature unknown ( x5 P& a+ P% h """4 H* [3 M9 A: H! _
Return True if the string is an alphabetic string, False otherwise. 5 U6 I% a! S( P8 H* O- \ 4 P7 |5 N5 {/ N$ V9 ^# O A string is alphabetic if all characters in the string are alphabetic and there & T) L) Q6 [, M3 F# y is at least one character in the string.# h; b- i i( ]
""" ) c6 W$ Q7 V. ~4 I pass 9 }5 S8 p4 R" e- O- Q8 R) ]/ e6 b: {- ^2 p" S
def isascii(self, *args, **kwargs): # real signature unknown# w9 H5 I7 o! Y, c; f* {- r
""" 3 c" H$ v! Z B9 N" X: P Return True if all characters in the string are ASCII, False otherwise.% g! V! m5 a- x. u6 W4 ^: q- @
* z4 V9 { J# Q/ h" w8 o ASCII characters have code points in the range U+0000-U+007F.- x% {3 e- k1 B; j5 g
Empty string is ASCII too. 5 k$ X+ h3 g$ p( _" v( z4 m """ 5 q, T: B* U6 m pass& P. Y7 Q/ L, w2 {. a! j6 X H2 Y' J/ P
7 a+ O) w/ \3 K( V
def isdecimal(self, *args, **kwargs): # real signature unknown; c6 @/ \1 H; x4 r' {1 L
""" / ]% [7 w. t! \( f" I9 a Return True if the string is a decimal string, False otherwise. 7 P5 I2 ~; ^8 i7 d4 {' G9 z9 [' o0 R$ r2 L; {; }
A string is a decimal string if all characters in the string are decimal and* H# U: [4 k3 M. w# N* _& G
there is at least one character in the string.4 g s( k/ X# {- G( a) \
""" I; q F+ c, Q/ `7 }3 Z
pass" V; }( c2 }( b [& c) U7 m
+ e, B& Z! v7 x5 _# Z; N( p
def isdigit(self, *args, **kwargs): # real signature unknown6 ~$ M0 d3 P4 O& i1 j3 I# F
"""6 X& n3 P! Z0 D% E
Return True if the string is a digit string, False otherwise. 2 Y- M# K, i% d3 ^0 b+ O# _6 Y3 }+ r4 E9 l
A string is a digit string if all characters in the string are digits and there ) _5 _4 j8 f" j5 o is at least one character in the string.) N9 ]- Z( Z+ g" t o, Q
"""& s8 R) U3 B% L2 e. V
pass6 N& \- K( i. N2 b2 E2 p1 J
; T7 @2 w2 h/ t1 F5 C
def isidentifier(self, *args, **kwargs): # real signature unknown7 [, N: L8 x# v! D e! a: U
"""4 n& W' q3 @7 m" C' A
Return True if the string is a valid Python identifier, False otherwise. 8 n; s" W1 }$ O% Z+ p1 c& t: f$ u" Y' O; ^" c
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, , ?% [4 I% s% c; F F. Z such as "def" or "class".7 f1 V* I3 R8 D& F. b
"""0 B4 q2 V) V1 \/ }. B0 G
pass ! K2 g% N6 @! x 9 Q5 i A( n" E: V def islower(self, *args, **kwargs): # real signature unknown4 Q0 ^' B5 J/ M- v
""" 1 R |1 I1 n4 R$ z Return True if the string is a lowercase string, False otherwise.0 S) f, w, P. R) m: p
( \" d. c! c4 a
A string is lowercase if all cased characters in the string are lowercase and5 e) N1 `- H* N% X( A. a( f
there is at least one cased character in the string.0 A `/ t, f: U' e$ z+ S
""" - O f( h/ p. ?& w6 y# t' N7 B pass 9 a- ^3 m4 z$ t1 V! L 2 P @ Q! Y6 \7 P, n def isnumeric(self, *args, **kwargs): # real signature unknown , w9 |( B# {: [( N """ * c' c4 T% s& `" T Return True if the string is a numeric string, False otherwise. ( a* _" b8 I. H$ Z! o % \6 \, K4 v+ G. t3 ` A string is numeric if all characters in the string are numeric and there is at / h0 b. ~) r8 L* q8 O8 H* i5 z; { least one character in the string. 4 g5 }2 K5 y$ E* U% D" C: ^* ~7 J """" {2 d( I& Q1 Q f; P
pass / l4 D" V: @- \* H ' j( q i# p5 Z# S3 |& b4 i6 L: v, {! d def isprintable(self, *args, **kwargs): # real signature unknown 2 P1 v! U% h% {# k1 ~0 I. G """) F t) n4 t6 C4 ?+ l1 k( C- Q9 `
Return True if the string is printable, False otherwise. 4 m2 b$ s' a* n& Z , _' [4 m& @9 _/ v A string is printable if all of its characters are considered printable in* f6 p" e* o7 @1 v% e& N$ Y" i
repr() or if it is empty. & L, l3 P7 c( m% \ """ 0 i$ r( ?) [% r3 r5 H pass0 V$ y; u# C9 u# H9 Y
% U8 l% ?2 a0 l7 A/ K& {
def isspace(self, *args, **kwargs): # real signature unknown 2 H( F5 l. b0 H" @# m! d """# G# F7 e5 r( r5 [% b, i# {
Return True if the string is a whitespace string, False otherwise./ [/ |2 B9 Q: d9 M5 ?- K b
* a. |) U) v7 ~, B: i5 i2 D) C A string is whitespace if all characters in the string are whitespace and there; q T* C) R/ T
is at least one character in the string.. T5 h! e( H3 K, j" b, m
"""& o5 S( R3 I; A3 d q9 O
pass/ C4 V$ y4 h- L+ K8 T
# \( ^6 z/ W2 ~6 O
def istitle(self, *args, **kwargs): # real signature unknown J$ g0 W- t3 l """3 ]2 r& \' K- F4 H
Return True if the string is a title-cased string, False otherwise.; z$ c! t# D# _) [ ^
6 N. Q- o7 g. ]2 ~ r
In a title-cased string, upper- and title-case characters may only/ j+ {6 d, e. w: D
follow uncased characters and lowercase characters only cased ones.: _' O$ T3 W7 J: o
""" 8 f! n2 c1 d0 D: I. L1 N4 c pass7 n2 F" w4 f. ]) V% m6 o
% ~$ h* K, W" G# ~$ M
def isupper(self, *args, **kwargs): # real signature unknown4 U( n- M4 W8 E' h) p& s
"""% G0 `+ T8 c/ Z' A2 \/ p$ T, P
Return True if the string is an uppercase string, False otherwise. # e. u5 Y# j, |$ Y3 d, I* h9 U, H
A string is uppercase if all cased characters in the string are uppercase and& k9 u1 i/ C+ d: l
there is at least one cased character in the string. - ]+ i% }; D2 F """ 4 a9 V9 C" C1 |: ]2 I6 s pass 3 ?( U3 d0 H4 x! M 5 ]- `0 T7 l7 d3 `0 h: O- } def join(self, ab=None, pq=None, rs=None): # real signature unknown; restored from __doc__; N8 t! G+ p, u6 x( b/ ^) b4 R
"""1 z3 @+ C- N& m; z: H
Concatenate any number of strings. - Q; I$ | G5 f! b& y/ i 7 w$ C2 A$ c* A( `% a3 | The string whose method is called is inserted in between each given string.2 }) @: f& S0 Z* c7 D6 j+ I
The result is returned as a new string. ) o/ G0 x0 h4 ^* |& Q 2 p2 B/ G9 O9 A2 i9 j Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs' 7 L. T- Z/ u9 N4 V ; P7 `4 D0 G' ]1 W 连接任意数量的字符串。 * `, R5 L% M4 _8 h 9 G: I$ x" ^8 k& }/ u( T 调用其方法的字符串被插入到每个给定字符串之间。 ( {1 H+ t8 Q% X6 O6 h$ p& w 结果以新字符串的形式返回。 & P6 }/ }) [6 B/ ] ) Q3 ]2 L+ \; R" _
例如:“。”。Join (['ab', 'pq', 'rs']) -> 'ab.pq.rs'9 a9 V; c# F/ e6 R$ S7 j3 ]$ |9 l
"""% D6 V# j- H+ @- @# W3 r* B
pass % V3 L8 ?" d' }6 y* f: S, v& T3 I7 f: b
def ljust(self, *args, **kwargs): # real signature unknown - x, S' F" B i: d """ ; }9 i: s- _5 ?, A+ r8 S+ b Return a left-justified string of length width.$ J$ u; i% ]6 d1 L" x$ [8 \ b
% T5 w5 I& t" M* Q
Padding is done using the specified fill character (default is a space).. b' R+ U+ q+ }/ B9 Y% L e H
1 U) U" w2 e" s+ k/ N 返回长度为width的左对齐字符串。9 G1 k3 ~6 G9 h( _7 ~$ L6 G
# X/ P1 i& ?2 |, Y 使用指定的填充字符(默认为空格)填充。 6 c; a; r0 v- n* S """$ C4 i$ w, W% {6 t% ?/ n' i/ y7 A: X
pass& K3 j' h" o" o. d; l
& {% p1 L4 H( d! `6 p4 E* U, N s def lower(self, *args, **kwargs): # real signature unknown - m# `6 E& y- U9 [& i """ Return a copy of the string converted to lowercase. . J: t! Q- m- j
返回转换为小写的字符串副本。""" 8 e8 F+ N$ ?2 s$ P! L7 B' C pass 1 O( B* J4 [) Y/ e- ]9 N9 Y' I3 X0 [$ J. q# F6 r
def lstrip(self, *args, **kwargs): # real signature unknown( e( S9 P. b w
"""5 ~0 U8 k1 B3 p- x
Return a copy of the string with leading whitespace removed.) o, Y6 i! c" h7 V* t- t/ F
* D5 h0 s8 h/ R( S7 W; \3 ]
If chars is given and not None, remove characters in chars instead. 3 f8 E" g$ y; ]1 d! u% ]% [: R5 r# D2 |2 A& f
返回删除前导空格的字符串副本。 0 ]% y9 d( l, |6 h/ D3 X- ~# O' P2 [
如果给出了chars而不是None,则删除chars中的字符。 0 N: J- I# i& Q; F """ + p. o% G/ }$ K/ g k0 s3 s& H pass5 |" n8 x9 l6 \: s' v
7 i3 \$ ]& Z( D. ] x def maketrans(self, *args, **kwargs): # real signature unknown / [5 r: R6 T; _: ~ t* ]: ]/ D """, I* H' S- Z( a) `" i" H8 i% j4 S: s
Return a translation table usable for str.translate(). ; z6 a9 r$ g. ?' \& ^1 w& l+ p# q8 R* G9 i+ d
If there is only one argument, it must be a dictionary mapping Unicode) Z- ]2 d) R+ j0 i2 u) A
ordinals (integers) or characters to Unicode ordinals, strings or None. 0 B0 j) j' q# a5 z. u) X Character keys will be then converted to ordinals. 2 u0 ]2 P) M+ h If there are two arguments, they must be strings of equal length, and ( l9 @4 \+ Z- D3 @" k6 \ in the resulting dictionary, each character in x will be mapped to the ~0 S6 E* r0 d G, H* Z( c character at the same position in y. If there is a third argument, it7 e* U" I& t2 {
must be a string, whose characters will be mapped to None in the result. . b9 ?: d% G, Z! F9 r """7 _* J+ [+ i( {: K( O: N- S, Y0 F+ d( u
pass ) w1 N2 {* x4 W * Z/ {0 L) [7 i- ?9 ? def partition(self, *args, **kwargs): # real signature unknown 9 z: _. Y# L5 y( u """ ' Q/ z% U* C* ~ Partition the string into three parts using the given separator.; m: P# G5 h3 R
! x8 t- _% Y. S/ p; T! p# q
This will search for the separator in the string. If the separator is found,; Z& @% [8 u( f1 _# |7 H" w
returns a 3-tuple containing the part before the separator, the separator J1 e6 l, z9 o+ l itself, and the part after it.# s# c5 M. d( G+ r% C
( `- e# Z- q/ v1 Y If the separator is not found, returns a 3-tuple containing the original string 0 c0 d$ o# b+ i: `0 G: \ and two empty strings. 1 _" ^: F6 f! v9 w/ n8 C """ ) l/ f6 X$ B' f pass- {- J% p$ c5 K( D
( m3 [8 F) U' q& ~2 I, [
def replace(self, *args, **kwargs): # real signature unknown & H3 U% Y6 t: A """ 8 I ^& g0 P) T" B9 A* A+ J6 j0 H3 t Return a copy with all occurrences of substring old replaced by new. 7 u1 w; p4 r- }8 j$ R! M / u8 `! G$ t% t$ u' V c count 8 l4 b8 T, \9 W- v5 G3 P Maximum number of occurrences to replace. # W/ z& C8 w( F3 c$ J/ k+ y$ _, N -1 (the default value) means replace all occurrences.6 [7 F. P& g8 R
# |# S( Q0 l5 t
If the optional argument count is given, only the first count occurrences are $ e* m, y4 l _8 r$ @- f. B replaced. * P( V; H, ?1 v9 W/ q7 t+ N3 y4 z5 }! z- a% r* @) j
返回一个副本,其中所有出现的子字符串old都被new替换。 + a9 A% h# B# m/ {: X8 W. `4 l- g1 o8 \
数 , I* v3 z- w/ h2 \# D3 t* E 替换的最大次数。 8 M( @3 _. y0 e+ E; g* P3 m -1(默认值)表示替换所有匹配项。 2 R1 {1 X9 V/ B: X9 ` . N! S4 B* Z) |. M( q 如果给出了可选参数count,则只出现第一个count更换。) ?" W+ J% [4 L! g; G& M
""" 1 L& p% M* p: o, m1 G3 H pass% W+ D- j7 r" w, X2 m
8 O1 N0 t2 A( k( t) j" ` F4 |- L' M! q
def rfind(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ 3 x5 h. F+ J3 `5 ]# y """' Y- t/ ?; Q: o# r
S.rfind(sub[, start[, end]]) -> int 6 l/ A: o( w9 Y. k1 Z: c " q0 {7 `4 W( z! o2 I Return the highest index in S where substring sub is found, ( e2 i. E4 @+ T such that sub is contained within S[start:end]. Optional 1 f; F# g) A7 g5 Q$ p$ I arguments start and end are interpreted as in slice notation." I5 ^( g, ^/ D8 w% w3 g2 Q* y3 L0 m
5 U6 W' u) M& X8 _) ~4 a5 D Return -1 on failure. . Z+ @' s5 K4 K) f, b """ * ^% y8 G6 S, B3 c6 E return 0 + e* @+ E% h0 w7 Q0 e) l, s3 D) N( S; q1 i5 w
def rindex(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ / P* }9 ~8 h& t9 `0 s """ 8 [ k: w+ Y% { S.rindex(sub[, start[, end]]) -> int& D( y( e* a* X
" N/ |3 w; H# K/ \( Y
Return the highest index in S where substring sub is found, 1 A A7 s8 j M! K( D ^ such that sub is contained within S[start:end]. Optional0 A n G( ?& H1 L
arguments start and end are interpreted as in slice notation. 9 v( X2 K+ i) n/ L7 [3 z/ Y! U' T) Z; ~/ C, P1 n, y. v
Raises ValueError when the substring is not found. * T8 Y. t7 E2 J% r; E! H """ ; t% k+ d: r8 w C' s3 n return 0 4 j1 {- L) r+ d r) q; `' k; s- t4 R! U" O' ] }
def rjust(self, *args, **kwargs): # real signature unknown0 W. V# F# t" F4 S9 o
""" a8 X2 g& e+ j2 Q* `# ? Return a right-justified string of length width. & Y; J& N$ {# p" i% G) O9 A& [2 F' J* j* d6 w
Padding is done using the specified fill character (default is a space). 3 e. C, I0 D+ J, t1 p$ ~2 t; l% b3 i+ ]% ], H0 D- V' X
返回长度为width的右对齐字符串。$ J- M( J. q1 a% t$ \* o) p
' k8 R$ m: d8 y1 P$ O1 [6 p6 u
使用指定的填充字符(默认为空格)填充。 - `. w0 z' l* J3 a# k """ & }, G+ M7 J& D3 _) j pass 9 n( b: t5 K0 m6 A " l# C1 e9 V0 m2 W def rpartition(self, *args, **kwargs): # real signature unknown; ]2 l: s% a+ k8 e. @- X# P
""" 7 u4 k, ^. w- ~# M3 F Partition the string into three parts using the given separator. " Y" f" W ]) }6 l0 v 5 }1 f9 u/ Q' K( W2 r This will search for the separator in the string, starting at the end. If 7 o6 B- l$ [$ m3 o6 O3 r8 @( X* ^ the separator is found, returns a 3-tuple containing the part before the 8 m( _3 m I C( O2 y S6 u6 O separator, the separator itself, and the part after it. 3 l5 E F/ U- l& W " [9 |( R- t; S7 N# x/ a If the separator is not found, returns a 3-tuple containing two empty strings % w5 f9 L( V4 Q3 D and the original string.. C1 B S" F! D% J5 \) b; y6 b% S
""" . T) u" i+ h# A: \: V pass- F8 t8 d: u; e" L
" m* F; C. t, {2 d def rsplit(self, *args, **kwargs): # real signature unknown 7 T: F1 Y3 d/ ?$ f; V3 A' b: b """ " t; ~. V m8 x+ z Return a list of the words in the string, using sep as the delimiter string. 7 m+ g* p! G6 {% r 3 m' R* q k! Q* @* Y! r# D sep X% M$ v- Q Z The delimiter according which to split the string.4 m, ~/ X. d, K3 K4 e5 T, p }
None (the default value) means split according to any whitespace,5 m' j3 J( E: y0 c, Y, h- Q
and discard empty strings from the result./ A8 p9 u7 F, I, ]8 R8 V
maxsplit* S% g. g9 a( e1 B
Maximum number of splits to do. 3 M" {% {8 t! E* F. f* L -1 (the default value) means no limit. " i4 i k9 Q5 r& c j" r; I8 u - ?4 ?. q5 U8 f Splits are done starting at the end of the string and working to the front. , q0 {1 _/ F+ v# f * Z9 N1 m; Z% M) m; E* _ 返回字符串中的单词列表,使用sep作为分隔符字符串。 ' S; ~- U H7 z sep 0 t0 _* [9 O4 j7 r- Z/ t' D 用来分割字符串的分隔符。8 {+ I6 e' _* M4 C/ ^
None(默认值)表示根据任何空格进行分割,并从结果中丢弃空字符串。3 d% `9 e, \1 ^# r1 P# A
n: r0 [1 R$ N/ C6 W: R5 |3 K7 z
maxsplit , I3 X+ w6 _/ K h& D% P( W 最大分割次数。$ b' H+ T$ W- x7 o! S/ [9 t8 j6 V
-1(默认值)表示无限制。! P; F- r5 Y/ l, J8 t2 \2 c H2 x
) h% V6 l# G" y/ z/ g& O% C/ o 劈叉从绳子的末端开始,一直到前面。 - Y& @, q r* A/ M. C/ W. j7 h """ 1 f# C$ G* Z& n. H pass w9 o& n6 T# W5 p 4 N7 N8 O' M7 F& b9 Q7 n% Y def rstrip(self, *args, **kwargs): # real signature unknown 4 {+ q* F3 @3 u """: \! V( I9 }) P" t- ^$ `& V
Return a copy of the string with trailing whitespace removed. 9 t. P4 E( Z+ c9 |9 @2 r& l' [! n: B* L9 v" e! h* U2 y
If chars is given and not None, remove characters in chars instead.$ T7 n% d" s9 k5 b$ ~7 }
3 s' V+ L" p' |: H# e# F
返回字符串的副本,删除尾随空格。& M/ W. v- D! R6 E4 H
) A8 f p2 Z' i I 如果给出了chars而不是None,则删除chars中的字符。6 L& S/ g3 O9 n/ \5 ]
""") ]5 | i% U- w y A
pass " u" K' w# P1 g- @1 v, G8 Z. W9 W$ p. Z- j8 w9 M: R
def split(self, *args, **kwargs): # real signature unknown. L# ?! r! r, G! _9 |
""" & ~+ p2 U% x) Y& Z% T' S7 F Return a list of the words in the string, using sep as the delimiter string. % i1 r* s/ ?2 ^- Q, }9 q( ?- ~% H% N6 A; w: Q
sep/ |' Q3 j# w- {+ F& d
The delimiter according which to split the string. : e0 E; o2 `( u8 {/ E None (the default value) means split according to any whitespace,2 U! d: w+ {+ T8 [
and discard empty strings from the result.7 Y7 V) W7 ~) _ k4 Z: H5 J( A# p
maxsplit# C: P! x4 d, i* Z' l+ @/ A
Maximum number of splits to do. + B' ?2 o6 P& ~( X) I -1 (the default value) means no limit.! S4 U8 \7 L" ?, a( c
""" " Y* y/ P7 Z V& C pass 8 p" g! ~$ ?6 Y3 z5 b 4 [3 h ]. }" s5 [3 i+ o def splitlines(self, *args, **kwargs): # real signature unknown+ y. C# q5 Z4 A1 H: a
"""' h) [" ?6 G! }- U
Return a list of the lines in the string, breaking at line boundaries. 2 y2 Y8 c" S/ P& l, J0 Q& g3 r: y' z& h* ^5 }- l
Line breaks are not included in the resulting list unless keepends is given and 6 U6 b* V6 Q7 P5 n. a# ] true.6 p- h2 z8 F1 U4 u
""" 3 u* Q% |" w. S6 A9 T! [7 ~: j pass 7 x/ b% \+ R( s1 r$ K9 g$ l 9 ]% T3 N9 r: ]4 q" o" \4 |1 D def startswith(self, prefix, start=None, end=None): # real signature unknown; restored from __doc__6 T- u5 L/ @2 w) P2 u# m
""", ~8 ~. p1 y3 X
S.startswith(prefix[, start[, end]]) -> bool ) H: F: o9 Y! K- f; o' Y6 h! g) K3 a: l- d7 W' M" Y, h3 x
Return True if S starts with the specified prefix, False otherwise. ! h7 b; t8 N* \9 a: W" @4 X With optional start, test S beginning at that position.5 N2 Y4 P, w F$ q! G
With optional end, stop comparing S at that position.( ]5 h, g: h9 T# L4 n' B
prefix can also be a tuple of strings to try.3 j8 M# _# a4 j) R4 B
""" # Y$ n$ w* P! p' w return False 5 s. `3 j" L: G4 N' | . c/ [, m* U& [! G6 `' I def strip(self, *args, **kwargs): # real signature unknown' K% F8 B0 V0 e }4 I6 `! h" a
"""5 d/ {9 o7 E4 a1 W
Return a copy of the string with leading and trailing whitespace removed.7 O) g6 D* T. A7 k& I) y- S
' |" N3 H4 Y- Z( J2 V" q If chars is given and not None, remove characters in chars instead. 1 S% U/ p: e- x8 ]' l2 F2 R$ F5 ^ # y; R* a4 d" }' Y3 `& q" k9 X 返回删除前导和尾随空格的字符串副本。; c( k6 _' P `6 J; w$ n/ L! ?9 C
/ w; O$ A Z3 G% a) i1 r
如果给出了chars而不是None,则删除chars中的字符。 ( \7 G" L( b: y: I7 S: F' |8 e+ O1 ]# Q """ 6 |, c) C: x4 I- U! w2 u pass/ D F y6 n6 P! ]/ ^* b
. E! ~; k a. ?0 T8 G% n& i- p def swapcase(self, *args, **kwargs): # real signature unknown , ? Z/ F \2 H3 H """ Convert uppercase characters to lowercase and lowercase characters to uppercase. """7 u" s( z' Z; [$ x
pass4 J2 ]* s4 J" s$ f
& W% O* a# F! N3 A- J9 u
def title(self, *args, **kwargs): # real signature unknown0 V( n# F6 s9 f+ l+ N
"""+ z& I4 m5 W; ^' S0 u1 p( U+ B
Return a version of the string where each word is titlecased.# ?! Z- Y! H ~5 y
: n! g3 G; g+ m4 c4 q4 W! p
More specifically, words start with uppercased characters and all remaining - f: g# Y C# W# s7 u8 S5 T5 N cased characters have lower case.. x7 l' G8 `2 p- `6 m$ R
"""* _8 D( J4 S& {* i; @1 x
pass 4 e! R! `0 ]) Y! O3 S( w! {( C- W( u, Q
def translate(self, *args, **kwargs): # real signature unknown " E1 C, Y0 j: U4 u& @# x0 }( Z """ , A6 r9 E# d$ q2 m1 b- \1 N Replace each character in the string using the given translation table. / L& }" S; ]) v) l) ] ( v" q1 Y# H L& _; X table L5 s, n; F* W! U Translation table, which must be a mapping of Unicode ordinals to 1 X4 x" P. e. B( }' m" ~ Unicode ordinals, strings, or None.3 g _% o8 G" m9 ^$ w' B) ?
/ b B, O$ `9 B5 y$ p; ] The table must implement lookup/indexing via __getitem__, for instance a 5 V% E1 w. s# Y% `! b7 \6 }; K. E dictionary or list. If this operation raises LookupError, the character is0 H6 u s; b1 r2 x- M
left untouched. Characters mapped to None are deleted.+ z: U3 N9 T% R; T
""" 1 ]: f! u7 ?7 L- l& j pass : u4 R& Q& w& ?+ E7 F# P - p/ e7 A4 y v4 I8 k def upper(self, *args, **kwargs): # real signature unknown : j7 P' r7 a6 D" o X) S """ Return a copy of the string converted to uppercase. """5 R2 U* w" }; T: p% `6 A
pass O9 D: C t0 B : ?5 Q" d7 f4 s$ p& c9 M3 [; ^- J def zfill(self, *args, **kwargs): # real signature unknown0 N' _, L$ k G1 A
""", ~& a# X7 p) r+ S* }3 |
Pad a numeric string with zeros on the left, to fill a field of the given width.# T/ S- L- {# [ W
0 \5 U6 L0 X0 D# H( g. @
The string is never truncated. 1 C% P% y" K9 E) U0 X, R% n$ [ """ / x9 Z# r/ e$ Y2 } pass ; i v* d. k f+ A9 K1 U 3 T5 k0 n, |+ H def __add__(self, *args, **kwargs): # real signature unknown' X v% e5 e8 D+ k9 t8 c
""" Return self+value. """ ' h3 G9 y6 K5 v+ e1 G pass9 A' U' @* D/ K+ s: X
" ^2 `0 t3 J. `4 |' v1 u, X5 m
def __contains__(self, *args, **kwargs): # real signature unknown( |+ S7 G* |" f
""" Return key in self. """) `# K3 M5 j4 `, K" m
pass$ s$ k- V9 \. N; e R S
6 `6 G6 X) Q5 @ H+ ?# f) O3 [) f
def __eq__(self, *args, **kwargs): # real signature unknown . M( A5 N- h. _& M* ~$ _% X* [ """ Return self==value. """. l- @ L9 P& X: d6 ^6 k
pass6 p1 k2 B. x$ x
' q! `, a0 L2 Y% A4 U def __format__(self, *args, **kwargs): # real signature unknown ' t$ m g+ C5 \: z """ Return a formatted version of the string as described by format_spec. """ ( b" c7 @" \. C5 q( c2 G pass 8 j, S/ V0 O! k4 C+ d+ M' R8 m/ M4 p2 R. Z% w4 F4 ] h
def __getattribute__(self, *args, **kwargs): # real signature unknown 7 x" I) n& D/ c! e """ Return getattr(self, name). """ 8 t4 u1 }2 Q( c* ~( N pass 0 F% D+ T: M+ ^/ U6 }* W0 y& a , t' c" h- s& K" H def __getitem__(self, *args, **kwargs): # real signature unknown- M) r8 k* U% o. W O
""" Return self[key]. """ ! i. t# n; q, t. f/ g$ h pass f, @2 w! L, T6 W# W/ h
. F3 A/ F2 ?$ B0 \* ^
def __getnewargs__(self, *args, **kwargs): # real signature unknown , N( j: F, Z. z5 M0 q pass7 I; \( t' f- i8 [% B! f! r" z
+ Y4 [! X! |/ L1 A def __ge__(self, *args, **kwargs): # real signature unknown) P' J0 Z" H: a. e+ d
""" Return self>=value. """ : @1 h% b4 H; `$ C" k3 O pass : C/ V$ |! M1 h1 |: P 1 n$ O& @" C9 \: E! g) K0 l( O4 q def __gt__(self, *args, **kwargs): # real signature unknown7 P: I* X% P1 e& R
""" Return self>value. """- o8 w) f% a* ~% e- H
pass 4 y3 w$ L% j. n8 e+ E+ l9 ^/ ` j6 M5 f" N/ Q
def __hash__(self, *args, **kwargs): # real signature unknown ) {0 @# F, G0 X- `4 t """ Return hash(self). """1 }* j7 o& ~( O7 }5 U6 o' s
pass% v8 j; g" X6 u9 p
) x& {: G; Z c8 z F
def __init__(self, value='', encoding=None, errors='strict'): # known special case of str.__init__2 u S7 y9 }" j3 t V" D
""" + d3 W& e; G$ A; W" z) @% P2 L7 r str(object='') -> str # m6 Q* U" Y; b0 N' ~' j% M9 E str(bytes_or_buffer[, encoding[, errors]]) -> str* ~$ O- Y* f# i7 c$ H& k3 D- n+ B' [
, H) k+ r+ n0 p. H3 J
Create a new string object from the given object. If encoding or & ~1 N% [: f7 M } errors is specified, then the object must expose a data buffer& I+ a: W$ A& e6 u, j( b
that will be decoded using the given encoding and error handler. + K; c+ f% M1 Y4 g$ y8 ? Otherwise, returns the result of object.__str__() (if defined) 4 T' J2 |) ^( x4 ^1 h$ i6 Z' U4 A or repr(object). 8 _6 v8 H4 i1 H( q: q8 N: m! t% ? encoding defaults to sys.getdefaultencoding(). ( E+ u1 g# T" ?' J P* \ errors defaults to 'strict'.2 P g3 O! P& f1 Y3 ]6 D' j
# (copied from class doc)8 _ g. Y2 p( q9 Q2 f- p
""" 4 u, U2 M+ X$ N( ] pass 7 a) O+ Q9 M$ ^, W* Z+ R 1 ~% j& S* M5 M) c def __iter__(self, *args, **kwargs): # real signature unknown : ?* s( u' Q# K """ Implement iter(self). """ 7 X. H0 ^+ B& T3 J4 |3 x pass$ O/ a$ ^) C' f+ _% {2 I: y
9 N, r- t- G; a/ G8 {* ?" T
def __len__(self, *args, **kwargs): # real signature unknown . {& {2 I$ B5 Q I+ ? """ Return len(self). """% n4 W# \- ] h, C/ X
pass i" ]( O! f6 j: V" `
& t1 J, z* O4 ^3 A def __le__(self, *args, **kwargs): # real signature unknown% X: V" g# |8 u3 X6 W' z$ X
""" Return self<=value. """/ I# ~/ f" S# G8 a+ a( D: a
pass. n" l5 H) M7 n+ U" |, o, s
$ D/ Z" }8 T/ j2 Q& q
def __lt__(self, *args, **kwargs): # real signature unknown. p* |, @1 i! I" T" c3 ^
""" Return self<value. """ + z( Q1 X9 L: N& x pass + o1 K" J, d) W- t: Y- w; E7 E 0 x. T( I5 |6 B7 o8 ^ def __mod__(self, *args, **kwargs): # real signature unknown$ L6 Y# d4 P! r$ a0 K
""" Return self%value. """" v m5 _, Z9 C, m: Y) B
pass1 |8 z3 _! ^7 s0 t. f
, r" A3 q; F& C2 h5 U4 z' ^ def __mul__(self, *args, **kwargs): # real signature unknown X6 x0 e) w1 c1 ~
""" Return self*value. """* N2 X& ~- |. y' {
pass 4 O& U: n% ~& T, @, F( q6 A0 U( a. J$ ~6 t( [8 [
@staticmethod # known case of __new__ 2 F1 O. u8 z$ z( e4 W* J( v def __new__(*args, **kwargs): # real signature unknown. t: ]& C% K& \5 Q0 e5 j# A, P
""" Create and return a new object. See help(type) for accurate signature. """2 F, o, f: G/ j( H% q
pass: X9 a& } x5 J% r
3 q! o7 D* P4 _5 t. X' M def __ne__(self, *args, **kwargs): # real signature unknown 5 j1 ]3 F! K+ |' e9 F """ Return self!=value. """8 n8 k$ j W: n+ o9 @* H
pass- i- u3 K6 `4 \: k! b: U
0 Y6 L# _# R4 r# c
def __repr__(self, *args, **kwargs): # real signature unknown / t/ E9 M/ @- y0 c( E* \, p """ Return repr(self). """! |5 C! r% B" I. M, R+ Z, e. I
pass; A* i7 i/ [# t; I
7 |* z L7 r5 @8 `
def __rmod__(self, *args, **kwargs): # real signature unknown ; G0 f- q9 D( C' ?4 {) x d """ Return value%self. """' m7 L6 Z' G8 k5 y; t! w
pass % ?1 C/ M/ }( { y+ F - T$ N! j! q- Q: g; r' d def __rmul__(self, *args, **kwargs): # real signature unknown , j8 N* W" O# g+ c- I """ Return value*self. """ 6 |2 t v) K4 M# ?/ S$ {& H. ^* k7 w pass - Q. |8 T) C& H6 K3 n8 k) `2 T- \% O& U; d! s- T( i1 |3 w
def __sizeof__(self, *args, **kwargs): # real signature unknown, J- m* P2 t$ }# \* L" M
""" Return the size of the string in memory, in bytes. """' a* z$ e3 B8 Z( n+ X1 k+ ~
pass6 C! o& U8 T8 L, e