def person(email, pw, pod=None): p = Person() p.firstName = min(email.split(".")[0], email.split("@")[0]) p.email = email p.active = True p.put() p.password = db.hashpass(pw, p.created) p.onjoin() pod and p.enroll(pod) return p