# HG changeset patch
# User Alexander Solovyov <piranha@piranha.org.ua>
# Date 1244059310 -10800
# Node ID 4e61d2809507280b47f287a3daed1ceb2d95b2cf
# Parent  eda828775a98f4a2d454963ebe597a3510751475
Better naming for variables in parse

diff -r eda828775a98 -r 4e61d2809507 fancyopts.py
--- a/fancyopts.py	Wed Jun 03 22:42:11 2009 +0300
+++ b/fancyopts.py	Wed Jun 03 23:01:50 2009 +0300
@@ -112,20 +112,20 @@
     shortlist = ''
     namelist = []
 
-    for short, oname, default, comment in options:
+    for short, name, default, comment in options:
         # change name to match Python styling
-        name = oname.replace('-', '_')
-        argmap['-' + short] = argmap['--' + oname] = name
-        state[name] = default
+        pyname = name.replace('-', '_')
+        argmap['-' + short] = argmap['--' + name] = pyname
+        defmap[pyname] = default
 
         # getopt wants indication that it takes a parameter
         if default not in (None, True, False):
             if short: short += ':'
-            if oname: oname += '='
+            if name: name += '='
         if short:
             shortlist += short
         if name:
-            namelist.append(oname)
+            namelist.append(name)
 
     opts, args = getopt.gnu_getopt(args, shortlist, namelist)