From 7d78a3f32996aad211e51e892465e2f9724e77e5 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 1 Nov 2014 14:21:18 -0400 Subject: let's just not have new at all --- mop/__init__.py | 8 +++----- 1 file 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,13 +200,11 @@ 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 )) -- cgit v1.2.3