# HG changeset patch # User gdesjardins # Date 1285347267 14400 # Node ID d79070c60546c6250d8383c156a3206cf2b69054 # Parent bf41991692eacb485605aa753f4b0d68116eed91# Parent 58a6919d3649609897c07e4a0427e8670a18100f merge diff -r bf41991692ea -r d79070c60546 doc/v2_planning/API_coding_style.txt --- a/doc/v2_planning/API_coding_style.txt Fri Sep 24 12:53:53 2010 -0400 +++ b/doc/v2_planning/API_coding_style.txt Fri Sep 24 12:54:27 2010 -0400 @@ -218,6 +218,19 @@ def f(array=[]): # Dangerous if `array` is modified down the road. ... + * All top-level classes should inherit from ``object``. It makes some + 'under-the-hood' differences that can be very useful for Python black + magic adepts. + + .. code-block:: python + + # Good. + class MyClass(object): + pass + # Bad. + class MyClass: + pass + * Always raise an exception with ``raise MyException(args)`` where ``MyException`` inherits from ``Exception``. This is required for compatibility across all versions of Python. diff -r bf41991692ea -r d79070c60546 doc/v2_planning/coding_style.txt --- a/doc/v2_planning/coding_style.txt Fri Sep 24 12:53:53 2010 -0400 +++ b/doc/v2_planning/coding_style.txt Fri Sep 24 12:54:27 2010 -0400 @@ -500,3 +500,13 @@ We need to add coding style guidelines to make sure code is properly serializable. +Meeting 2010/09/24 +------------------ + +FB: Look into commit guidelines. +DE: Write guidelines on how to document a class / method (maybe also some +typical class like an Op) +DWF: Write guidelines on how to write serializable code +OD: Finish code sample that showcases all (or many) guidelines, look into +feasibility of passing arguments to super classes with **kw. +