aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-11-01 14:21:18 -0400
committerJesse Luehrs <doy@tozt.net>2014-11-01 14:21:18 -0400
commit7d78a3f32996aad211e51e892465e2f9724e77e5 (patch)
tree42b3187049d330035dd875b0abac2f6e59cf46bd
parentf6e1a96ee451a6ef72631a35095781645a56a941 (diff)
downloadpython-mop-7d78a3f32996aad211e51e892465e2f9724e77e5.tar.gz
python-mop-7d78a3f32996aad211e51e892465e2f9724e77e5.zip
let's just not have new at all
-rw-r--r--mop/__init__.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mop/__init__.py b/mop/__init__.py
index 2bea205..5281f96 100644
--- a/mop/__init__.py
+++ b/mop/__init__.py
@@ -200,14 +200,12 @@ def bootstrap():
"create_instance", create_instance
))
+ # using __call__ in order to make the syntax look like normal python
+ # constructors, but this is really just a normal static method, it's still
+ # not anything python-specific
def new(self, **kwargs):
return self.create_instance(kwargs)
Class.add_method(bootstrap_create_method(
- "new", new
- ))
-
- # not strictly necessary, but makes constructors nicer
- Class.add_method(bootstrap_create_method(
"__call__", new
))