From 44315a25cbce44a0f129fa481e3031a1e6e1ecb4 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 8 Jun 2018 19:14:57 +0000 Subject: [PATCH] Deploy to GitHub Pages: ac62db1cf17c0af44dc2b2117f9ddeee327e5e7c --- develop/doc/html/index.html | 2 +- .../html/numpy/.doctrees/environment.pickle | Bin 18348 -> 18348 bytes develop/doc/html/reference/index.html | 2 +- develop/doc/html/tutorial/index.html | 2 +- .../html/tutorial/tutorial/techniques.html | 32 ------------------ 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/develop/doc/html/index.html b/develop/doc/html/index.html index 5301b297..3bc6bfd0 100644 --- a/develop/doc/html/index.html +++ b/develop/doc/html/index.html @@ -126,7 +126,7 @@

- +

Last revised: June 04, 2018 at 14:42:11 GMT

Last revised: June 08, 2018 at 19:14:40 GMT


diff --git a/develop/doc/html/numpy/.doctrees/environment.pickle b/develop/doc/html/numpy/.doctrees/environment.pickle index a6489db76c1c3c99ea02c99d9e293807fbac0836..cae699d7c0defe23c2271cb884250f9441d1b176 100644 GIT binary patch delta 154 zcmZ3}&$ywuNhTv3!pz*-kWm6*rn97E)IykXasRn9+92%s M*k_wrU6wNg0JVEc&;S4c delta 154 zcmZ3}&$yf@52y-oqcZMC5xyU!e z9l~5Z>0(9zgt?AAJ|hysT(l`TBMHJ>>Gm%p8^T<-(=($4!d!jRA)^+;T - +

Last revised: June 04, 2018 at 14:42:17 GMT

Last revised: June 08, 2018 at 19:14:46 GMT


diff --git a/develop/doc/html/tutorial/index.html b/develop/doc/html/tutorial/index.html index a6e55a30..cf1b84e3 100644 --- a/develop/doc/html/tutorial/index.html +++ b/develop/doc/html/tutorial/index.html @@ -140,7 +140,7 @@ - +

Last revised: June 04, 2018 at 14:42:14 GMT

Last revised: June 08, 2018 at 19:14:43 GMT


diff --git a/develop/doc/html/tutorial/tutorial/techniques.html b/develop/doc/html/tutorial/tutorial/techniques.html index 1081efe3..328c7ced 100644 --- a/develop/doc/html/tutorial/tutorial/techniques.html +++ b/develop/doc/html/tutorial/tutorial/techniques.html @@ -288,38 +288,6 @@ the interface) -

- You can even add a little syntactic sugar with the use of metaclasses. Let's - create a special metaclass that "injects" methods in other classes. -

-
# The one Boost.Python uses for all wrapped classes.
-# You can use here any class exported by Boost instead of "point"
-BoostPythonMetaclass = point.__class__
-
-class injector(object):
-    class __metaclass__(BoostPythonMetaclass):
-        def __init__(self, name, bases, dict):
-            for b in bases:
-                if type(b) not in (self, type):
-                    for k,v in dict.items():
-                        setattr(b,k,v)
-            return type.__init__(self, name, bases, dict)
-
-# inject some methods in the point foo
-class more_point(injector, point):
-    def __repr__(self):
-        return 'Point(x=%s, y=%s)' % (self.x, self.y)
-    def foo(self):
-        print 'foo!'
-
-

- Now let's see how it got: -

-
>>> print point()
-Point(x=10, y=10)
->>> point().foo()
-foo!
-

Another useful idea is to replace constructors with factory functions: