mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-14 00:25:17 +00:00
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
.ascii_letters: Str
|
|
.ascii_lowercase: Str
|
|
.ascii_uppercase: Str
|
|
.digits: Str
|
|
.hexdigits: Str
|
|
.octdigits: Str
|
|
.punctuation: Str
|
|
.printable: Str
|
|
.whitespace: Str
|
|
|
|
.capwords: (s: Str, sep := Str) -> Str
|
|
|
|
.Template: ClassType
|
|
.Template.
|
|
template: Str
|
|
__call__: (template: Str) -> .Template
|
|
substitute: (self: .Template, mapping := {Str: Str}, **kws: Str) -> Str
|
|
safe_substitute: (self: .Template, mapping := {Str: Str}, **kws: Str) -> Str
|
|
is_valid: (self: .Template) -> Bool
|
|
get_identifiers: (self: .Template) -> [Str; _]
|
|
|
|
FormatterIterator = 'formatteriterator': ClassType
|
|
FormatterIterator <: Iterable [Str; _]
|
|
|
|
.Formatter: ClassType
|
|
.Formatter <: InheritableType
|
|
.Formatter.
|
|
__call__: () -> .Formatter
|
|
format: (self: .Formatter, format_string: Str, *args: Obj, **kwargs: Obj) -> Str
|
|
vformat: (self: .Formatter, format_string: Str, args: [Obj; _], kwargs: {Str: Obj}) -> Str
|
|
parse: (self: .Formatter, format_string: Str) -> FormatterIterator
|
|
get_field: |T, U|(self: .Formatter, field_name: Str, args: [T; _], kwargs: {Str: U}) -> (T or U, Str or Int)
|
|
get_value: (|T|(self: .Formatter, key: Str, args: [Obj; _], kwargs: {Str: T}) -> T) \
|
|
and (|T|(self: .Formatter, key: Nat, args: [T; _], kwargs: {Str: Obj}) -> T)
|