X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=README.Coding;h=956a733a4ce77e7d4b7dd4ceec0dd6449bc3a323;hb=ae144978bc7141e66426eccf08450a6408eda359;hp=12997ccf9addaa925f62d1622c5cb55f51aaa29e;hpb=25054a3071d2cd8a7433ee9aed9f6a2b732bfbbc;p=samba.git diff --git a/README.Coding b/README.Coding index 12997ccf9ad..956a733a4ce 100644 --- a/README.Coding +++ b/README.Coding @@ -21,9 +21,13 @@ coding style (See Documentation/CodingStyle in the kernel source tree). This closely matches what most Samba developers use already anyways, with a few exceptions as mentioned below. -The coding style for Python code is documented in PEP8, http://www.python.org/pep/pep8. -If you have ever worked on another free software python project, you are probably -already familiar with it. +The coding style for Python code is documented in PEP8, +http://www.python.org/pep/pep8 (with spaces). +If you have ever worked on another free software Python project, you are +probably already familiar with it. + +We try to stay compatible with Python 2.4, so please don't rely on any +features that were introduced later, such as the "with" statement. But to save you the trouble of reading the Linux kernel style guide, here are the highlights. @@ -363,3 +367,13 @@ Bad Example: ret = some_function_my_name(get_some_name()); ... +Control-Flow changing macros +---------------------------- + +Macros like NT_STATUS_NOT_OK_RETURN that change control flow +(return/goto/etc) from within the macro are considered bad, because +they look like function calls that never change control flow. Please +do not use them in new code. + +The only exception is the test code that depends repeated use of calls +like CHECK_STATUS, CHECK_VAL and others.