On Fri, 2004-02-27 at 05:55, Thomas Heller wrote: > rhettinger at users.sourceforge.net writes: > > > if (PyObject_Size(args) < 0) return NULL; > > > > ! args = PyTuple_Pack(1, args); > > ! if (args == NULL) > > ! return NULL; > > ! tmp = PyObject_Call(joiner, args, NULL); > > ! Py_DECREF(args); > > UNLESS (tmp) return NULL; > > There are both tabs and spaces in this code. Question: is there a > convention about tabs and spaces in C code? Personally, I'd like to see all the Python C code be reformatted to 4 space indents, or at least, new C modules to be indented that way. However, PEP 7 is the C style guide for Python code, and it clearly lays out the rule: - Use single-tab indents, where a tab is worth 8 spaces. and: (2) To be consistent with surrounding code that also breaks [a rule] (maybe for historic reasons) -- although this is also an opportunity to clean up someone else's mess (in true XP style) So. Be consistent but default to using tabs. -Barry http://www.python.org/peps/pep-0007.html
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