From 85780543aace5714aadf4f3ebece14e96a6ddb53 Mon Sep 17 00:00:00 2001 From: James Vega Date: Wed, 13 Oct 2004 14:57:25 +0000 Subject: [PATCH] Add some (hopefully) elucidating comments. If anyone (*cough*jemfinch*cough) thinks they are ambiguous or could be better worded, please adjust. --- src/commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands.py b/src/commands.py index 98299f6b8..433695fe1 100644 --- a/src/commands.py +++ b/src/commands.py @@ -544,6 +544,8 @@ class context(object): def __repr__(self): return '<%s for %s>' % (self.__class__.__name__, self.spec) +# additional means: Look for this (and make sure it's of this type). If +# there are no arguments for us to check, then use our default. class additional(context): def __init__(self, spec, default=None): self.__parent = super(additional, self) @@ -557,6 +559,8 @@ class additional(context): log.debug('Got IndexError, returning default.') setDefault(state, self.default) +# optional means: Look for this, but if it's not the type I'm expecting or +# there are no arguments for us to check, then use the default value. class optional(additional): def __call__(self, irc, msg, args, state): try: