mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
51d18937af
We want methods to act like they're "bound" to the object, so that you can make your method conditional on the `doc`, `span` or `token` instance --- like, well, a method. We therefore partially apply the function, which works like this: ``` def partial(unbound_method, constant_arg): def bound_method(*args, **kwargs): return unbound_method(constant_arg, *args, **kwargs) return bound_method |
||
---|---|---|
.. | ||
__init__.pxd | ||
__init__.py | ||
binder.pyx | ||
doc.pxd | ||
doc.pyx | ||
printers.py | ||
span.pxd | ||
span.pyx | ||
token.pxd | ||
token.pyx | ||
underscore.py |