jjzjj

RegexObject

全部标签

python - 为什么 Python 函数文档在可选参数的括号后包含逗号?

Python文档中函数签名的格式有点困惑。将逗号放在开括号之后而不是之前有什么意义?嵌套括号有什么意义?他们是怎样的:RegexObject.match(string[,pos[,endpos]])我希望出现以下情况之一:RegexObject.match(string,[pos],[endpos])RegexObject.match(string[,pos][,endpos]) 最佳答案 方括号表示内容是可选的,方括号外的内容是必填的。用你的符号:RegexObject.match(string,[pos],[endpos])我希