When investigating calling conventions, I took a special look at METH_OLDARGS occurrences. While most of them look reasonable, file.writelines caught my attention. It has if (args == NULL || !PySequence_Check(args)) { PyErr_SetString(PyExc_TypeError, "writelines() argument must be a sequence of strings"); return NULL; } Because it is a METH_OLDARGS method, you can do f=open("/tmp/x","w") f.writelines("foo\n","bar\n") With my upcoming patches, I'd replace this with METH_O, making this call illegal. Does anybody see a problem with that change in semantics? Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4