.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.py.pseudo

.. highlight:: python



.. _wx.py.pseudo.PseudoKeyword:

==========================================================================================================================================
|phoenix_title|  **wx.py.pseudo.PseudoKeyword**
==========================================================================================================================================

A callable class that calls a method passed as a parameter.

Good for creating a pseudo keyword in the python runtime
environment. The keyword is really an object that has a repr()
that calls itself which calls the method that was passed in the
init of the object. All this just to avoid having to type in the
closing parens on a method. So, for example:

    >>> quit = PseudoKeyword(SomeObject.someMethod)
    >>> quit

SomeObject.someMethod gets executed as if it had been called
directly and the user didn't have to type the parens, like
'quit()'. This technique is most applicable for pseudo keywords
like quit, exit and help.

If SomeObject.someMethod can take parameters, they can still be
passed by using the keyword in the traditional way with parens.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PseudoKeyword</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.py.pseudo.PseudoKeyword_inheritance.png" alt="Inheritance diagram of PseudoKeyword" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.py.pseudo.PseudoKeyword.html" title="wx.py.pseudo.PseudoKeyword" alt="" coords="5,5,213,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.py.pseudo.PseudoKeyword.__init__`                                     Create a callable object that executes method when called.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: PseudoKeyword

   A callable class that calls a method passed as a parameter.
   
   Good for creating a pseudo keyword in the python runtime
   environment. The keyword is really an object that has a repr()
   that calls itself which calls the method that was passed in the
   init of the object. All this just to avoid having to type in the
   closing parens on a method. So, for example:
   
       >>> quit = PseudoKeyword(SomeObject.someMethod)
       >>> quit
   
   SomeObject.someMethod gets executed as if it had been called
   directly and the user didn't have to type the parens, like
   'quit()'. This technique is most applicable for pseudo keywords
   like quit, exit and help.
   
   If SomeObject.someMethod can take parameters, they can still be
   passed by using the keyword in the traditional way with parens.

   .. method:: __init__(self, method)

      Create a callable object that executes method when called.


