[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread coder.maliubiao
New submission from coder.maliubiao: code: int PyTuple_SetItem(register PyObject *op, register Py_ssize_t i, PyObject *newitem) { register PyObject *olditem; register PyObject **p; if (!PyTuple_Check(op) || op-ob_refcnt != 1) { Py_XDECREF(newitem

[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread coder.maliubiao
Changes by coder.maliubiao maliub...@gmail.com: -- type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20945 ___ ___ Python-bugs

[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-26 Thread coder.maliubiao
New submission from coder.maliubiao maliub...@gmail.com: the code: import os,stat mode=os.stat(a broken link file).st_mode then i got :OSError: [Errno 2] No such file or directory. why not just treat a broken link as something existing and don't report any error. -- components