summaryrefslogtreecommitdiffstats
path: root/FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2023-01-23 14:28:53 -0800
committeryum <yum.food.vr@gmail.com>2023-01-23 14:32:09 -0800
commit9fff496394dcd94c4084694ca96a5e07ab836274 (patch)
treed89b78e16ecb6011bdd74555da79f7a8c1d90752 /FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst
parent9329d64f991b8b3289af22e4c2eedb09a97c5640 (diff)
package.ps1 now fetches all dependencies
Don't literally check in Python since it looks dodgy (rightfully so). Instead the build script just fetches it. * Update README, simplifying language and documenting other projects
Diffstat (limited to 'FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst')
-rw-r--r--FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst29
1 files changed, 0 insertions, 29 deletions
diff --git a/FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst b/FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst
deleted file mode 100644
index d737384..0000000
--- a/FOSS/Python/Dependencies/future-0.18.2/docs/bind_method.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-.. _bind-method:
-
-Binding a method to a class
----------------------------
-
-Python 2 draws a distinction between bound and unbound methods, whereas
-in Python 3 this distinction is gone: unbound methods have been removed
-from the language. To bind a method to a class compatibly across Python
-3 and Python 2, you can use the :func:`bind_method` helper function::
-
- from future.utils import bind_method
-
- class Greeter(object):
- pass
-
- def greet(self, message):
- print(message)
-
- bind_method(Greeter, 'greet', greet)
-
- g = Greeter()
- g.greet('Hi!')
-
-
-On Python 3, calling ``bind_method(cls, name, func)`` is equivalent to
-calling ``setattr(cls, name, func)``. On Python 2 it is equivalent to::
-
- import types
- setattr(cls, name, types.MethodType(func, None, cls))