-
Notifications
You must be signed in to change notification settings - Fork 212
/
Python.py
3013 lines (2958 loc) · 65.2 KB
/
Python.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# 3.13 https://www.python.org/
# https://ironpython.net/
# https://www.jython.org/
# https://cython.org/
# http://cobra-language.com/
# https://boo-language.github.io/
# https://wiki.gnome.org/Projects/Genie
#! keywords ===========================================================
# https://docs.python.org/3/reference/lexical_analysis.html#identifiers
and as assert async await
break
class continue
def del
elif else except
finally for from
global
if import in is
lambda
nonlocal not
or
pass
raise return
try
while with
yield
# soft keywords
case match
type
# https://docs.python.org/2.7/reference/lexical_analysis.html#identifiers
exec print
#! Built-in Constants ===========================================================
# https://docs.python.org/3/library/constants.html
False None True NotImplemented Ellipsis
__debug__ __main__
self
#! Built-in Functions ===========================================================
# https://docs.python.org/3/library/functions.html
__builtins__
builtins
abs(x)
aiter(async_iterable)
all(iterable)
anext(async_iterator)
anext(async_iterator, default)
any(iterable)
ascii(object)
bin(x)
class bool(x=False)
breakpoint(*args, **kws)
class bytearray(source=b'')
class bytearray(source, encoding)
class bytearray(source, encoding, errors):
class bytes(source=b'')
class bytes(source, encoding)
class bytes(source, encoding, errors):
callable(object)
chr(i)
@classmethod
classmethod()
compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
class complex(real=0, imag=0)
class complex(string)
delattr(object, name)
class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg):
dir()
dir(object)
divmod(a, b)
enumerate(iterable, start=0)
eval(expression, globals=None, locals=None)
exec(object, globals=None, locals=None, /, *, closure=None)
filter(function, iterable)
class float(x=0.0)
format(value, format_spec='')
class frozenset(iterable=set())
getattr(object, name)
getattr(object, name, default)
globals()
hasattr(object, name)
hash(object)
help()
help(request)
hex(x)
id(object)
input()
input(prompt)
class int(x=0)
class int(x, base=10)
isinstance(object, classinfo)
issubclass(class, classinfo)
iter(object)
iter(object, sentinel)
len(s)
class list
class list(iterable)
locals()
map(function, iterable, *iterables)
max(iterable, *, key=None)
max(iterable, *, default, key=None)
max(arg1, arg2, *args, key=None)
class memoryview(object):
min(iterable, *, key=None)
min(iterable, *, default, key=None)
min(arg1, arg2, *args, key=None)
next(iterator)
next(iterator, default)
class object
oct(x)
open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
ord(c)
pow(base, exp, mod=None)
print(*objects, sep=' ', end='\n', file=None, flush=False)
class property(fget=None, fset=None, fdel=None, doc=None)
@property
class range(stop)
class range(start, stop, step=1)
repr(object)
reversed(seq)
round(number, ndigits=None)
class set
class set(iterable):
setattr(object, name, value)
class slice(stop)
class slice(start, stop, step=None)
sorted(iterable, /, *, key=None, reverse=False)
@staticmethod
staticmethod(function)
class str(object='')
class str(object=b'', encoding='utf-8', errors='strict'):
sum(iterable, /, start=0)
class super
class super(type, object_or_type=None)
class tuple
class tuple(iterable)
class type(object)
class type(name, bases, dict, **kwds)
vars()
vars(object)
zip(*iterables, strict=False)
__import__(name, globals=None, locals=None, fromlist=(), level=0)
# https://docs.python.org/2.7/library/functions.html#built-in-functions
class basestring()
cmp(x, y)
execfile(filename[, globals[, locals]])
class file(name[, mode[, buffering]])
class long(x=0)
class long(x, base=10)
raw_input([prompt])
reduce(function, iterable[, initializer])
reload(module)
unichr(i)
class unicode(object='')
class unicode(object[, encoding[, errors]])
class xrange(stop)
class xrange(start, stop[, step])
apply(function, args[, keywords])
class buffer(object[, offset[, size]])
coerce(x, y)
intern(string)
# https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module
site
quit(code=None)
exit(code=None)
copyright
license
credits
#! attributes ===========================================================
# https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy
__all__
__version__
# Callable types
# https://docs.python.org/3/reference/datamodel.html#callable-types
__globals__
__closure__
__doc__
__name__
__qualname__
__module__
__defaults__
__code__
__dict__
__annotations__
__kwdefaults__
__type_params__
__self__
__func__
__doc__
__name__
__module__
# Modules
# https://docs.python.org/3/reference/datamodel.html#modules
__name__
__spec__
__package__
__loader__
__path__
__file__
__cached__
__doc__
__annotations__
__dict__
# Custom classes
# https://docs.python.org/3/reference/datamodel.html#custom-classes
__name__
__qualname__
__module__
__dict__
__bases__
__doc__
__annotations__
__type_params__
__static_attributes__
__firstlineno__
__dict__
__class__
__bases__
__name__
__qualname__
__type_params__
__mro__
mro()
__subclasses__()
#! special method ===========================================================
# https://docs.python.org/3/reference/datamodel.html#special-method-names
object:
# Basic customization
__new__(cls[, ...])
__init__(self[, ...])
__del__(self)
__repr__(self)
__str__(self)
__bytes__(self)
__format__(self, format_spec)
__lt__(self, other)
__le__(self, other)
__eq__(self, other)
__ne__(self, other)
__gt__(self, other)
__ge__(self, other)
__hash__(self)
__bool__(self)
# Customizing attribute access
__getattr__(self, name)
__getattribute__(self, name)
__setattr__(self, name, value)
__delattr__(self, name)
__dir__(self)
# Implementing Descriptors
__get__(self, instance, owner=None)
__set__(self, instance, value)
__delete__(self, instance)
__objclass__
__slots__
__weakref__
# Customizing class creation
__init_subclass__(cls)
__set_name__(self, owner, name)
__mro_entries__(self, bases)
# Emulating generic types
__class_getitem__(cls, key)
# Emulating callable objects
__call__(self[, args...])
# Emulating container types
__len__(self)
__length_hint__(self)
__getitem__(self, key)
__setitem__(self, key, value)
__delitem__(self, key)
__missing__(self, key)
__iter__(self)
__reversed__(self)
__contains__(self, item)
# Emulating numeric types
__add__(self, other)
__sub__(self, other)
__mul__(self, other)
__matmul__(self, other)
__truediv__(self, other)
__floordiv__(self, other)
__mod__(self, other)
__divmod__(self, other)
__pow__(self, other[, modulo])
__lshift__(self, other)
__rshift__(self, other)
__and__(self, other)
__xor__(self, other)
__or__(self, other)
__radd__(self, other)
__rsub__(self, other)
__rmul__(self, other)
__rmatmul__(self, other)
__rtruediv__(self, other)
__rfloordiv__(self, other)
__rmod__(self, other)
__rdivmod__(self, other)
__rpow__(self, other[, modulo])
__rlshift__(self, other)
__rrshift__(self, other)
__rand__(self, other)
__rxor__(self, other)
__ror__(self, other)
__iadd__(self, other)
__isub__(self, other)
__imul__(self, other)
__imatmul__(self, other)
__itruediv__(self, other)
__ifloordiv__(self, other)
__imod__(self, other)
__ipow__(self, other[, modulo])
__ilshift__(self, other)
__irshift__(self, other)
__iand__(self, other)
__ixor__(self, other)
__ior__(self, other)
__neg__(self)
__pos__(self)
__abs__(self)
__invert__(self)
__complex__(self)
__int__(self)
__float__(self)
__index__(self)
__round__(self[, ndigits])
__trunc__(self)
__floor__(self)
__ceil__(self)
# With Statement Context Managers
__enter__(self)
__exit__(self, exc_type, exc_value, traceback)
# Pattern Matching
__match_args__
# Emulating buffer types
__buffer__(self, flags)
__release_buffer__(self, buffer)
# Coroutines
__await__(self)
# Asynchronous Iterators
__aiter__(self)
__anext__(self)
# Asynchronous Context Managers
__aenter__(self)
__aexit__(self, exc_type, exc_value, traceback)
__sizeof__(self)
# Python 2.7
__cmp__(self, other)
__nonzero__(self)
__unicode__(self)
__div__(self, other)
__rdiv__(self, other)
__idiv__(self, other)
__long__(self)
__oct__(self)
__hex__(self)
__coerce__(self, other)
# Metaclasses
class:
__metaclass__ # Python 2.7
__prepare__(name, bases, **kwds)
__instancecheck__(self, instance)
__subclasscheck__(self, subclass)
#! exceptions ===========================================================
# https://docs.python.org/3/library/exceptions.html
BaseException
BaseExceptionGroup
GeneratorExit
KeyboardInterrupt
SystemExit
Exception
ArithmeticError
FloatingPointError
OverflowError
ZeroDivisionError
AssertionError
AttributeError
BufferError
EOFError
ExceptionGroup
ImportError
ModuleNotFoundError
LookupError
IndexError
KeyError
MemoryError
NameError
UnboundLocalError
OSError
BlockingIOError
ChildProcessError
ConnectionError
BrokenPipeError
ConnectionAbortedError
ConnectionRefusedError
ConnectionResetError
FileExistsError
FileNotFoundError
InterruptedError
IsADirectoryError
NotADirectoryError
PermissionError
ProcessLookupError
TimeoutError
ReferenceError
RuntimeError
NotImplementedError
RecursionError
StopAsyncIteration
StopIteration
SyntaxError
IndentationError
TabError
SystemError
TypeError
ValueError
UnicodeError
UnicodeDecodeError
UnicodeEncodeError
UnicodeTranslateError
Warning
BytesWarning
DeprecationWarning
EncodingWarning
FutureWarning
ImportWarning
PendingDeprecationWarning
ResourceWarning
RuntimeWarning
SyntaxWarning
UnicodeWarning
UserWarning
#! API ===========================================================
# https://docs.python.org/3/library/index.html
# Built-in Types
# https://docs.python.org/3/library/stdtypes.html
int:
bit_length()
bit_count()
to_bytes(length=1, byteorder='big', *, signed=False)
from_bytes(bytes, byteorder='big', *, signed=False)
as_integer_ratio()
is_integer()
float:
as_integer_ratio()
is_integer()
hex()
fromhex(s)
list:
min(s)
max(s)
index(x[, i[, j]])
count(x)
append(x)
clear()
copy()
extend(t)
insert(i, x)
pop()
pop(i)
remove(x)
reverse()
sort(*, key=None, reverse=False)
str:
capitalize()
casefold()
center(width[, fillchar])
count(sub[, start[, end]])
encode(encoding="utf-8", errors="strict | ignore | replace | xmlcharrefreplace | backslashreplace")
endswith(suffix[, start[, end]])
expandtabs(tabsize=8)
find(sub[, start[, end]])
format(*args, **kwargs)
format_map(mapping)
index(sub[, start[, end]])
isalnum()
isalpha()
isascii()
isdecimal()
isdigit()
isidentifier()
islower()
isnumeric()
isprintable()
isspace()
istitle()
isupper()
join(iterable)
ljust(width[, fillchar])
lower()
lstrip([chars])
maketrans(x[, y[, z]])
partition(sep)
removeprefix(prefix, /)
removesuffix(suffix, /)
replace(old, new[, count])
rfind(sub[, start[, end]])
rindex(sub[, start[, end]])
rjust(width[, fillchar])
rpartition(sep)
rsplit(sep=None, maxsplit=-1)
rstrip([chars])
split(sep=None, maxsplit=-1)
splitlines([keepends])
startswith(prefix[, start[, end]])
strip([chars])
swapcase()
title()
translate(table)
upper()
zfill(width)
bytearray:
fromhex(string)
maketrans(from, to)
bytes:
fromhex(string)
hex([sep[, bytes_per_sep]])
count(sub[, start[, end]])
removeprefix(prefix, /)
removesuffix(suffix, /)
decode(encoding="utf-8", errors="strict | ignore | replace")
endswith(suffix[, start[, end]])
find(sub[, start[, end]])
index(sub[, start[, end]])
join(iterable)
maketrans(from, to)
partition(sep)
replace(old, new[, count])
rfind(sub[, start[, end]])
rindex(sub[, start[, end]])
rpartition(sep)
startswith(prefix[, start[, end]])
translate(table, /, delete=b'')
center(width[, fillbyte])
ljust(width[, fillbyte])
lstrip([chars])
rjust(width[, fillbyte])
rsplit(sep=None, maxsplit=-1)
rstrip([chars])
split(sep=None, maxsplit=-1)
strip([chars])
capitalize()
expandtabs(tabsize=8)
isalnum()
isalpha()
isascii()
isdigit()
islower()
isspace()
istitle()
isupper()
lower()
splitlines(keepends=False)
swapcase()
title()
upper()
zfill(width)
memoryview:
__eq__(exporter)
tobytes(order='C')
hex([sep[, bytes_per_sep]])
tolist()
toreadonly()
release()
cast(format[, shape])
obj
nbytes
readonly
format
itemsize
ndim
shape
strides
suboffsets
c_contiguous
f_contiguous
contiguous
set:
isdisjoint(other)
issubset(other)
issuperset(other)
union(*others)
intersection(*others)
difference(*others)
symmetric_difference(other)
copy()
update(*others)
intersection_update(*others)
difference_update(*others)
symmetric_difference_update(other)
add(elem)
remove(elem)
discard(elem)
pop()
clear()
dict:
clear()
copy()
fromkeys(iterable[, value])
get(key[, default])
items()
keys()
pop(key[, default])
popitem()
reversed(d)
setdefault(key[, default])
update([other])
values()
property:
getter
setter
deleter
slice:
indices(self, length)
# https://docs.python.org/3/library/exceptions.html
exception BaseException:
__context__
__context__
__suppress_context__
args
with_traceback(tb)
__traceback__
add_note(note)
__notes__
exception ImportError
name
path
exception OSError([arg])
exception OSError(errno, strerror[, filename[, winerror[, filename2]]]):
errno
winerror
strerror
filename
filename2
exception StopIteration
value
exception SyntaxError(message, details):
filename
lineno
offset
text
end_lineno
end_offset
exception SystemExit:
code
exception UnicodeError:
encoding
reason
object
start
end
exception BlockingIOError:
characters_written
exception BaseExceptionGroup(msg, excs):
message
exceptions
subgroup(condition)
split(condition)
derive(excs)
# Text Processing Services
# https://docs.python.org/3/library/text.html
string
ascii_letters
ascii_lowercase
ascii_uppercase
digits
hexdigits
octdigits
punctuation
printable
whitespace
class Formatter:
format(format_string, /, *args, **kwargs)
vformat(format_string, args, kwargs)
parse(format_string)
get_field(field_name, args, kwargs)
get_value(key, args, kwargs)
check_unused_args(used_args, args, kwargs)
format_field(value, format_spec)
convert_field(value, conversion)
class Template(template):
substitute(mapping={}, /, **kwds)
safe_substitute(mapping={}, /, **kwds)
is_valid()
get_identifiers()
template
capwords(s, sep=None)
re
class RegexFlag
ASCII
DEBUG
IGNORECASE
MULTILINE
DOTALL
VERBOSE
compile(pattern, flags=0)
search(pattern, string, flags=0)
match(pattern, string, flags=0)
fullmatch(pattern, string, flags=0)
split(pattern, string, maxsplit=0, flags=0)
findall(pattern, string, flags=0)
finditer(pattern, string, flags=0)
sub(pattern, repl, string, count=0, flags=0)
subn(pattern, repl, string, count=0, flags=0)
escape(pattern)
purge()
exception PatternError(msg, pattern=None, pos=None):
msg
pattern
pos
lineno
colno
class Pattern:
search(string[, pos[, endpos]])
match(string[, pos[, endpos]])
fullmatch(string[, pos[, endpos]])
split(string, maxsplit=0)
findall(string[, pos[, endpos]])
finditer(string[, pos[, endpos]])
sub(repl, string, count=0)
subn(repl, string, count=0)
flags
groups
groupindex
pattern
class Match:
expand(template)
group([group1, ...])
__getitem__(g)
groups(default=None)
groupdict(default=None)
start([group])
end([group])
span([group])
pos
endpos
lastindex
lastgroup
string
textwrap
wrap(text, width=70, **kwargs)
fill(text, width=70, **kwargs)
shorten(text, width, **kwargs)
dedent(text)
indent(text, prefix, predicate=None)
class TextWrapper(**kwargs):
width
expand_tabs
tabsize
replace_whitespace
drop_whitespace
initial_indent
subsequent_indent
fix_sentence_endings
break_long_words
break_on_hyphens
max_lines
placeholder
wrap(text)
fill(text)
unicodedata
lookup(name)
name(chr[, default])
decimal(chr[, default])
digit(chr[, default])
numeric(chr[, default])
category(chr)
bidirectional(chr)
combining(chr)
east_asian_width(chr)
mirrored(chr)
decomposition(chr)
normalize(form, unistr)
is_normalized(form, unistr)
unidata_version
ucd_3_2_0
# Binary Data Services
# https://docs.python.org/3/library/binary.html
struct
exception error(msg)
pack(format, v1, v2, ...)
pack_into(format, buffer, offset, v1, v2, ...)
unpack(format, buffer)
unpack_from(format, /, buffer, offset=0)
iter_unpack(format, buffer)
calcsize(format)
class Struct(format):
pack(v1, v2, ...)
pack_into(buffer, offset, v1, v2, ...)
unpack(buffer)
unpack_from(buffer, offset=0)
iter_unpack(buffer)
format
size
codecs
encode(obj, encoding='utf-8', errors='strict | ignore | replace | xmlcharrefreplace | backslashreplace | namereplace | surrogateescape | surrogatepass')
decode(obj, encoding='utf-8', errors='strict')
lookup(encoding)
class CodecInfo(encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None)
getencoder(encoding)
getdecoder(encoding)
getincrementalencoder(encoding)
getincrementaldecoder(encoding)
getreader(encoding)
getwriter(encoding)
register(search_function)
unregister(search_function)
open(filename, mode='r', encoding=None, errors='strict', buffering=- 1)
EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
iterencode(iterator, encoding, errors='strict', **kwargs)
iterdecode(iterator, encoding, errors='strict', **kwargs)
BOM_UTF8
BOM_UTF16
BOM_UTF16_BE
BOM_UTF16_LE
BOM_UTF32
BOM_UTF32_BE
BOM_UTF32_LE
register_error(name, error_handler)
lookup_error(name)
strict_errors(exception)
replace_errors(exception)
ignore_errors(exception)
xmlcharrefreplace_errors(exception)
backslashreplace_errors(exception)
namereplace_errors(exception)
class Codec:
encode(input[, errors])
decode(input[, errors])
class IncrementalEncoder(errors='strict'):
encode(object[, final])
reset()
getstate()
setstate(state)
class IncrementalDecoder(errors='strict'):
decode(object[, final])
reset()
getstate()
setstate(state)
class StreamWriter(stream, errors='strict'):
write(object)
writelines(list)
reset()
class StreamReader(stream, errors='strict'):
read(size=- 1, chars=- 1, firstline=False)
readline(size=None, keepends=True)
readlines(sizehint=None, keepends=True)
reset()
class StreamReaderWriter(stream, Reader, Writer, errors='strict')
class StreamRecoder(stream, encode, decode, Reader, Writer, errors='strict')
# Data Types
# https://docs.python.org/3/library/datatypes.html
datetime
MINYEAR
MAXYEAR
UTC
class timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0):
min
max
resolution
total_seconds()
class date(year, month, day):
today()
fromtimestamp(timestamp)
fromordinal(ordinal)
fromisoformat(date_string)
fromisocalendar(year, week, day)
min
max
resolution
year
month
day
replace(year=self.year, month=self.month, day=self.day)
timetuple()
toordinal()
weekday()
isoweekday()
isocalendar()
isoformat()
ctime()
strftime(format)
__format__(format)
class datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0):
today()
now(tz=None)
fromtimestamp(timestamp, tz=None)
fromordinal(ordinal)
combine(date, time, tzinfo=self.tzinfo)
fromisoformat(date_string)
fromisocalendar(year, week, day)
strptime(date_string, format)
min
max
resolution
year
month
day
hour
minute
second
microsecond
tzinfo
fold
date()
time()
timetz()
replace(year=self.year, month=self.month, day=self.day, hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0)
astimezone(tz=None)
utcoffset()
dst()
tzname()
timetuple()
toordinal()
timestamp()
weekday()
isoweekday()
isocalendar()
isoformat(sep='T', timespec='auto')
ctime()
strftime(format)
__format__(format)
class time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0):
min
max
resolution
hour
minute
second
microsecond
tzinfo
fold
fromisoformat(time_string)
replace(hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0)
isoformat(timespec='auto')
strftime(format)
utcoffset()
dst()
tzname()
class tzinfo:
utcoffset(dt)
dst(dt)
tzname(dt)
fromutc(dt)
class timezone(offset, name=None):
utcoffset(dt)
tzname(dt)
dst(dt)
fromutc(dt)
utc
collections
class ChainMap(*maps):
maps
new_child(m=None, **kwargs)
parents
class Counter([iterable-or-mapping]):
elements()
most_common([n])
subtract([iterable-or-mapping])
total()
fromkeys(iterable)
update([iterable-or-mapping])
class deque([iterable[, maxlen]]):
append(x)
appendleft(x)
clear()
copy()
count(x)
extend(iterable)
extendleft(iterable)
index(x[, start[, stop]])
insert(i, x)