瀏覽代碼

formatting

Dave Schuyler 20 年之前
父節點
當前提交
3c5d0ca0ef
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      direct/src/showbase/PythonUtil.py

+ 5 - 5
direct/src/showbase/PythonUtil.py

@@ -358,10 +358,10 @@ def _getcode(f):
         else:
             return f.__name__, lambda: None
     codedict = { types.UnboundMethodType: method_get,
-                 types.MethodType       : method_get,
-                 types.FunctionType     : function_get,
-                 types.InstanceType     : instance_get,
-                 types.ClassType        : class_get,
+                 types.MethodType:        method_get,
+                 types.FunctionType:      function_get,
+                 types.InstanceType:      instance_get,
+                 types.ClassType:         class_get,
                  }
     try:
         return codedict[type(f)](f)
@@ -1657,7 +1657,7 @@ def weightedRand(valDict, rng=random.random):
     pass in a dictionary with a selection -> weight mapping.  Eg.
     {"Choice 1": 10,
      "Choice 2": 30,
-     "bear"     : 100}
+     "bear":     100}
 
     -Weights need not add up to any particular value.
     -The actual selection will be returned.