From feed0b5595bb65b553459b6c6c256de51a4c4276 Mon Sep 17 00:00:00 2001
From: Thomas Wiest <twiest@redhat.com>
Date: Wed, 24 Jun 2015 10:48:11 -0400
Subject: added python new method params should use a default value to best
 practices guide.

---
 docs/best_practices_guide.adoc | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

(limited to 'docs/best_practices_guide.adoc')

diff --git a/docs/best_practices_guide.adoc b/docs/best_practices_guide.adoc
index 912617461..1e96655e1 100644
--- a/docs/best_practices_guide.adoc
+++ b/docs/best_practices_guide.adoc
@@ -27,6 +27,32 @@ The tooling is flexible enough that exceptions can be made so that the tool the
 
 == Python
 
+=== Method Signatures
+
+'''
+[cols="2v,v"]
+|===
+| **Rule**
+| When adding a new paramemter to an existing method, a default value SHOULD be used
+|===
+The purpose of this rule is to make it so that method signatures are backwards compatible.
+
+If this rule isn't followed, it will be necessary for the person who changed the method to search out all callers and make sure that they're able to use the new method signature.
+
+Example:
+.Before:
+[source,python]
+----
+def add_person(first_name, last_name):
+----
+
+.After:
+[source,python]
+----
+def add_person(first_name, last_name, age=None):
+----
+
+
 === PyLint
 http://www.pylint.org/[PyLint] is used in an attempt to keep the python code as clean and as managable as possible. The build bot runs each pull request through PyLint and any warnings or errors cause the build bot to fail the pull request.
 
-- 
cgit v1.2.1

