Pet*_*mit 31 python cpython standard-library string-split
在我看来,我遇到了这种奇怪的行为:
"a b c".split(maxsplit=1)
TypeError: split() takes no keyword arguments
Run Code Online (Sandbox Code Playgroud)
为什么str.split()不接受关键字参数,即使它有意义?我在Python2和Python3中都发现了这种行为.