summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-12-01 00:23:59 +0100
committerhut <hut@lepus.uberspace.de>2015-12-01 00:23:59 +0100
commit834cbb1d8459fb9d5c173dcf9ea2f0651ea09c58 (patch)
tree8441dff2d009b81c3fe2f5ecddd413c45d58a8af /ranger
parentc4e793c256b3645ab665d48a742d4ac925b75ef8 (diff)
downloadranger-834cbb1d8459fb9d5c173dcf9ea2f0651ea09c58.tar.gz
ext.openstruct: removed redundant "__" suffix for arguments
It's not necessary to prepend __ before the *args/**keywords argument
names, because python handles it elegantly by putting any arguments with
conflicting names into the **keywords variable.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/openstruct.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/ranger/ext/openstruct.py b/ranger/ext/openstruct.py
index 8737a84f..96a75f49 100644
--- a/ranger/ext/openstruct.py
+++ b/ranger/ext/openstruct.py
@@ -3,20 +3,17 @@
 
 import collections
 
-# prepend __ to arguments because one might use "args"
-# or "keywords" as a keyword argument.
-
 class OpenStruct(dict):
     """The fusion of dict and struct"""
-    def __init__(self, *__args, **__keywords):
-        dict.__init__(self, *__args, **__keywords)
+    def __init__(self, *args, **keywords):
+        dict.__init__(self, *args, **keywords)
         self.__dict__ = self
 
 
 class DefaultOpenStruct(collections.defaultdict):
     """The fusion of dict and struct, with default values"""
-    def __init__(self, *__args, **__keywords):
-        collections.defaultdict.__init__(self, None, *__args, **__keywords)
+    def __init__(self, *args, **keywords):
+        collections.defaultdict.__init__(self, None, *args, **keywords)
         self.__dict__ = self
 
     def __getattr__(self, name):