python默认字符_python字符串

1 classstr(object):2 """

3 str(object='') -> str4 str(bytes_or_buffer[, encoding[, errors]]) -> str5

6 Create a new string object from the given object. If encoding or7 errors is specified, then the object must expose a data buffer8 that will be decoded using the given encoding and error handler.9 Otherwise, returns the result of object.__str__() (if defined)10 or repr(object).11 encoding defaults to sys.getdefaultencoding().12 errors defaults to 'strict'.13 """

14 def capitalize(self): #real signature unknown; restored from __doc__

15 """

16 S.capitalize() -> str17

18 Return a capitalized version of S, i.e. make the first character19 have upper case and the rest lower case.20 """

21 return ""

22

23 def casefold(self): #real signature unknown; restored from __doc__

24 """

25 S.casefold() -> str26

27 Return a version of S suitable for caseless comparisons.28 """

29 return ""

30

31 def center(self, width, fillchar=None): #real signature unknown; restored from __doc__

32 """

33 S.center(width[, fillchar]) -> str34

35 Return S centered in a string of length width. Padding is36 done using the specified fill character (default is a space)37 """

38 return ""

39

40 def count(self, sub, start=None, end=None): #real signature unknown; restored from __doc__

41 """

42 S.count(sub[, start[, end]]) -> int43

44 Return the number of non-overlapping occurrences of substring sub in45 string S[start:end]. Optional arguments start and end are46 interpreted as in slice notation.47 """

48 return049

50 def encode(self, encoding='utf-8', errors='strict'): #real signature unknown; restored from __doc__

51 """

52 S.encode(encoding='utf-8', errors='strict') -> bytes53

54 Encode S using the codec registered for encoding. Default encoding55 is 'utf-8'. errors may be given to set a different error56 handling scheme. Default is 'strict' meaning that encoding errors raise57 a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and58 'xmlcharrefreplace' as well as any other name registered with59 codecs.register_error that can handle UnicodeEncodeErrors.60 """

61 return b""

62

63 def endswith(self, suffix, start=None, end=None): #real signature unknown; restored from __doc__

64 """

65 S.endswith(suffix[, start[, end]]) -> bool66

67 Return True if S ends with the specified suffix, False otherwise.68 With optional start, test S beginning at that position.69 With optional end, stop comparing S at that position.70 suffix can also be a tuple of strings to try.71 """

72 returnFalse73

74 def expandtabs(self, tabsize=8): #real signature unknown; restored from __doc__

75 """

76 S.expandtabs(tabsize=8) -> str77

78 Return a copy of S where all tab characters are expanded using spaces.79 If tabsize is not given, a tab size of 8 characters is assumed.80 """

81 return ""

82

83 def find(self, sub, start=None, end=None): #real signature unknown; restored from __doc__

84 """

85 S.find(sub[, start[, end]]) -> int86

87 Return the lowest index in S where substring sub is found,88 such that sub is contained within S[start:end]. Optional89 arguments start and end are interpreted as in slice notation.90

91 Return -1 on failure.92 """

93 return094

95 def format(self, *args, **kwargs): #known special case of str.format

96 """

97 S.format(*args, **kwargs) -> str98

99 Return a formatted version of S, using substitutions from args and kwargs.100 The substitutions are identified by braces ('{' and '}').101 """

102 pass

103

104 def format_map(self, mapping): #real signature unknown; restored from __doc__

105 """

106 S.format_map(mapping) -> str107

108 Return a formatted version of S, using substitutions from mapping.109 The substitutions are identified by braces ('{' and '}').110 """

111 return ""

112

113 def index(self, sub, start=None, end=None): #real signature unknown; restored from __doc__

114 """

115 S.index(sub[, start[, end]]) -> int116

117 Like S.find() but raise ValueError when the substring is not found.118 """

119 return0120

121 def isalnum(self): #real signature unknown; restored from __doc__

122 """

123 S.isalnum() -> bool124

125 Return True if all characters in S are alphanumeric126 and there is at least one character in S, False otherwise.127 """

128 returnFalse129

130 def isalpha(self): #real signature unknown; restored from __doc__

131 """

132 S.isalpha() -> bool133

134 Return True if all characters in S are alphabetic135 and there is at least one character in S, False otherwise.136 """

137 returnFalse138

139 def isdecimal(self): #real signature unknown; restored from __doc__

140 """

141 S.isdecimal() -> bool142

143 Return True if there are only decimal characters in S,144 False otherwise.145 """

146 returnFalse147

148 def isdigit(self): #real signature unknown; restored from __doc__

149 """

150 S.isdigit() -> bool151

152 Return True if all characters in S are digits153 and there is at least one character in S, False otherwise.154 """

155 returnFalse156

157 def isidentifier(self): #real signature unknown; restored from __doc__

158 """

159 S.isidentifier() -> bool160

161 Return True if S is a valid identifier according162 to the language definition.163

164 Use keyword.iskeyword() to test for reserved identifiers165 such as "def" and "class".166 """

167 returnFalse168

169 def islower(self): #real signature unknown; restored from __doc__

170 """

171 S.islower() -> bool172

173 Return True if all cased characters in S are lowercase and there is174 at least one cased character in S, False otherwise.175 """

176 returnFalse177

178 def isnumeric(self): #real signature unknown; restored from __doc__

179 """

180 S.isnumeric() -> bool181

182 Return True if there are only numeric characters in S,183 False otherwise.184 """

185 returnFalse186

187 def isprintable(self): #real signature unknown; restored from __doc__

188 """

189 S.isprintable() -> bool190

191 Return True if all characters in S are considered192 printable in repr() or S is empty, False otherwise.193 """

194 returnFalse195

196 def isspace(self): #real signature unknown; restored from __doc__

197 """

198 S.isspace() -> bool199

200 Return True if all characters in S are whitespace201 and there is at least one character in S, False otherwise.202 """

203 returnFalse204

205 def istitle(self): #real signature unknown; restored from __doc__

206 """

207 S.istitle() -> bool208

209 Return True if S is a titlecased string and there is at least one210 character in S, i.e. upper- and titlecase characters may only211 follow uncased characters and lowercase characters only cased ones.212 Return False otherwise.213 """

214 returnFalse215

216 def isupper(self): #real signature unknown; restored from __doc__

217 """

218 S.isupper() -> bool219

220 Return True if all cased characters in S are uppercase and there is221 at least one cased character in S, False otherwise.222 """

223 returnFalse224

225 def join(self, iterable): #real signature unknown; restored from __doc__

226 """

227 S.join(iterable) -> str228

229 Return a string which is the concatenation of the strings in the230 iterable. The separator between elements is S.231 """

232 return ""

233

234 def ljust(self, width, fillchar=None): #real signature unknown; restored from __doc__

235 """

236 S.ljust(width[, fillchar]) -> str237

238 Return S left-justified in a Unicode string of length width. Padding is239 done using the specified fill character (default is a space).240 """

241 return ""

242

243 def lower(self): #real signature unknown; restored from __doc__

244 """

245 S.lower() -> str246

247 Return a copy of the string S converted to lowercase.248 """

249 return ""

250

251 def lstrip(self, chars=None): #real signature unknown; restored from __doc__

252 """

253 S.lstrip([chars]) -> str254

255 Return a copy of the string S with leading whitespace removed.256 If chars is given and not None, remove characters in chars instead.257 """

258 return ""

259

260 def maketrans(self, *args, **kwargs): #real signature unknown

261 """

262 Return a translation table usable for str.translate().263

264 If there is only one argument, it must be a dictionary mapping Unicode265 ordinals (integers) or characters to Unicode ordinals, strings or None.266 Character keys will be then converted to ordinals.267 If there are two arguments, they must be strings of equal length, and268 in the resulting dictionary, each character in x will be mapped to the269 character at the same position in y. If there is a third argument, it270 must be a string, whose characters will be mapped to None in the result.271 """

272 pass

273

274 def partition(self, sep): #real signature unknown; restored from __doc__

275 """

276 S.partition(sep) -> (head, sep, tail)277

278 Search for the separator sep in S, and return the part before it,279 the separator itself, and the part after it. If the separator is not280 found, return S and two empty strings.281 """

282 pass

283

284 def replace(self, old, new, count=None): #real signature unknown; restored from __doc__

285 """

286 S.replace(old, new[, count]) -> str287

288 Return a copy of S with all occurrences of substring289 old replaced by new. If the optional argument count is290 given, only the first count occurrences are replaced.291 """

292 return ""

293

294 def rfind(self, sub, start=None, end=None): #real signature unknown; restored from __doc__

295 """

296 S.rfind(sub[, start[, end]]) -> int297

298 Return the highest index in S where substring sub is found,299 such that sub is contained within S[start:end]. Optional300 arguments start and end are interpreted as in slice notation.301

302 Return -1 on failure.303 """

304 return0305

306 def rindex(self, sub, start=None, end=None): #real signature unknown; restored from __doc__

307 """

308 S.rindex(sub[, start[, end]]) -> int309

310 Like S.rfind() but raise ValueError when the substring is not found.311 """

312 return0313

314 def rjust(self, width, fillchar=None): #real signature unknown; restored from __doc__

315 """

316 S.rjust(width[, fillchar]) -> str317

318 Return S right-justified in a string of length width. Padding is319 done using the specified fill character (default is a space).320 """

321 return ""

322

323 def rpartition(self, sep): #real signature unknown; restored from __doc__

324 """

325 S.rpartition(sep) -> (head, sep, tail)326

327 Search for the separator sep in S, starting at the end of S, and return328 the part before it, the separator itself, and the part after it. If the329 separator is not found, return two empty strings and S.330 """

331 pass

332

333 def rsplit(self, sep=None, maxsplit=-1): #real signature unknown; restored from __doc__

334 """

335 S.rsplit(sep=None, maxsplit=-1) -> list of strings336

337 Return a list of the words in S, using sep as the338 delimiter string, starting at the end of the string and339 working to the front. If maxsplit is given, at most maxsplit340 splits are done. If sep is not specified, any whitespace string341 is a separator.342 """

343 return[]344

345 def rstrip(self, chars=None): #real signature unknown; restored from __doc__

346 """

347 S.rstrip([chars]) -> str348

349 Return a copy of the string S with trailing whitespace removed.350 If chars is given and not None, remove characters in chars instead.351 """

352 return ""

353

354 def split(self, sep=None, maxsplit=-1): #real signature unknown; restored from __doc__

355 """

356 S.split(sep=None, maxsplit=-1) -> list of strings357

358 Return a list of the words in S, using sep as the359 delimiter string. If maxsplit is given, at most maxsplit360 splits are done. If sep is not specified or is None, any361 whitespace string is a separator and empty strings are362 removed from the result.363 """

364 return[]365

366 def splitlines(self, keepends=None): #real signature unknown; restored from __doc__

367 """

368 S.splitlines([keepends]) -> list of strings369

370 Return a list of the lines in S, breaking at line boundaries.371 Line breaks are not included in the resulting list unless keepends372 is given and true.373 """

374 return[]375

376 def startswith(self, prefix, start=None, end=None): #real signature unknown; restored from __doc__

377 """

378 S.startswith(prefix[, start[, end]]) -> bool379

380 Return True if S starts with the specified prefix, False otherwise.381 With optional start, test S beginning at that position.382 With optional end, stop comparing S at that position.383 prefix can also be a tuple of strings to try.384 """

385 returnFalse386

387 def strip(self, chars=None): #real signature unknown; restored from __doc__

388 """

389 S.strip([chars]) -> str390

391 Return a copy of the string S with leading and trailing392 whitespace removed.393 If chars is given and not None, remove characters in chars instead.394 """

395 return ""

396

397 def swapcase(self): #real signature unknown; restored from __doc__

398 """

399 S.swapcase() -> str400

401 Return a copy of S with uppercase characters converted to lowercase402 and vice versa.403 """

404 return ""

405

406 def title(self): #real signature unknown; restored from __doc__

407 """

408 S.title() -> str409

410 Return a titlecased version of S, i.e. words start with title case411 characters, all remaining cased characters have lower case.412 """

413 return ""

414

415 def translate(self, table): #real signature unknown; restored from __doc__

416 """

417 S.translate(table) -> str418

419 Return a copy of the string S in which each character has been mapped420 through the given translation table. The table must implement421 lookup/indexing via __getitem__, for instance a dictionary or list,422 mapping Unicode ordinals to Unicode ordinals, strings, or None. If423 this operation raises LookupError, the character is left untouched.424 Characters mapped to None are deleted.425 """

426 return ""

427

428 def upper(self): #real signature unknown; restored from __doc__

429 """

430 S.upper() -> str431

432 Return a copy of S converted to uppercase.433 """

434 return ""

435

436 def zfill(self, width): #real signature unknown; restored from __doc__

437 """

438 S.zfill(width) -> str439

440 Pad a numeric string S with zeros on the left, to fill a field441 of the specified width. The string S is never truncated.442 """

443 return ""

444

445 def __add__(self, *args, **kwargs): #real signature unknown

446 """Return self+value."""

447 pass

448

449 def __contains__(self, *args, **kwargs): #real signature unknown

450 """Return key in self."""

451 pass

452

453 def __eq__(self, *args, **kwargs): #real signature unknown

454 """Return self==value."""

455 pass

456

457 def __format__(self, format_spec): #real signature unknown; restored from __doc__

458 """

459 S.__format__(format_spec) -> str460

461 Return a formatted version of S as described by format_spec.462 """

463 return ""

464

465 def __getattribute__(self, *args, **kwargs): #real signature unknown

466 """Return getattr(self, name)."""

467 pass

468

469 def __getitem__(self, *args, **kwargs): #real signature unknown

470 """Return self[key]."""

471 pass

472

473 def __getnewargs__(self, *args, **kwargs): #real signature unknown

474 pass

475

476 def __ge__(self, *args, **kwargs): #real signature unknown

477 """Return self>=value."""

478 pass

479

480 def __gt__(self, *args, **kwargs): #real signature unknown

481 """Return self>value."""

482 pass

483

484 def __hash__(self, *args, **kwargs): #real signature unknown

485 """Return hash(self)."""

486 pass

487

488 def __init__(self, value='', encoding=None, errors='strict'): #known special case of str.__init__

489 """

490 str(object='') -> str491 str(bytes_or_buffer[, encoding[, errors]]) -> str492

493 Create a new string object from the given object. If encoding or494 errors is specified, then the object must expose a data buffer495 that will be decoded using the given encoding and error handler.496 Otherwise, returns the result of object.__str__() (if defined)497 or repr(object).498 encoding defaults to sys.getdefaultencoding().499 errors defaults to 'strict'.500 # (copied from class doc)501 """

502 pass

503

504 def __iter__(self, *args, **kwargs): #real signature unknown

505 """Implement iter(self)."""

506 pass

507

508 def __len__(self, *args, **kwargs): #real signature unknown

509 """Return len(self)."""

510 pass

511

512 def __le__(self, *args, **kwargs): #real signature unknown

513 """Return self<=value."""

514 pass

515

516 def __lt__(self, *args, **kwargs): #real signature unknown

517 """Return self

518 pass

519

520 def __mod__(self, *args, **kwargs): #real signature unknown

521 """Return self%value."""

522 pass

523

524 def __mul__(self, *args, **kwargs): #real signature unknown

525 """Return self*value.n"""

526 pass

527

528 @staticmethod #known case of __new__

529 def __new__(*args, **kwargs): #real signature unknown

530 """Create and return a new object. See help(type) for accurate signature."""

531 pass

532

533 def __ne__(self, *args, **kwargs): #real signature unknown

534 """Return self!=value."""

535 pass

536

537 def __repr__(self, *args, **kwargs): #real signature unknown

538 """Return repr(self)."""

539 pass

540

541 def __rmod__(self, *args, **kwargs): #real signature unknown

542 """Return value%self."""

543 pass

544

545 def __rmul__(self, *args, **kwargs): #real signature unknown

546 """Return self*value."""

547 pass

548

549 def __sizeof__(self): #real signature unknown; restored from __doc__

550 """S.__sizeof__() -> size of S in memory, in bytes"""

551 pass

552

553 def __str__(self, *args, **kwargs): #real signature unknown

554 """Return str(self)."""

555 pass

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值