From add72ef5daa00ee3c48faccf44bf8ba6205fb244 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 27 Apr 2011 02:35:11 +0300 Subject: [PATCH] Add a docstring --- pokedex/util/movesets.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pokedex/util/movesets.py b/pokedex/util/movesets.py index 9588c2e..a6533ca 100755 --- a/pokedex/util/movesets.py +++ b/pokedex/util/movesets.py @@ -625,6 +625,15 @@ default_costs = { ### class Facade(object): + """Facade for optput objects + + The main algorithm uses integers (and tiny strings, and sets, dicts, + tuples you get the picture...). + The rest of the world uses ORM objects. + So, all objects that are returned in results have "object ID" attributes + ending in an underscore (e.g. pokemon_), and this base class adds + underscore-less properties that get the underlying object. + """ @property def pokemon(self): return self.search.session.query(tables.Pokemon).filter_by(id=self.pokemon_).one()