ó
mÜJ]c           @` ss   d  Z  d d l m Z m Z m Z m Z d d l Z e j e ƒ Z	 d d l
 m Z d	 Z d e f d „  ƒ  YZ d S(
   uO    Utilities for specifying, validating, and documenting configuration
options.

i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t   HasPropsu   Optionst   Optionsc           B` s   e  Z d  Z d d „ Z RS(   uT   Leverage the Bokeh properties type system for specifying and
    validating configuration options.

    Subclasses of ``Options`` specify a set of configuration options
    using standard Bokeh properties:

    .. code-block:: python

        class ConnectOpts(Options):

            host = String(default="127.0.0.1", help="a host value")

            port = Int(default=5590, help="a port value")

    Then a ``ConnectOpts`` can be created by passing a dictionary
    containing keys and values corresponding to the configuration options,
    as well as any additional keys and values. The items corresponding
    to the properties on ``ConnectOpts`` will be ***removed*** from the
    dictionary. This can be useful for functions that accept their own
    set of config keyword arguments in addition to some set of Bokeh model
    properties.

    c         C` sY   i  } x6 |  j  ƒ  D]( } | | k r | j | ƒ | | <q q Wt t |  ƒ j |   d  S(   N(   t
   propertiest   popt   superR   t   __init__(   t   selft   kwt   propst   k(    (    s1   lib/python2.7/site-packages/bokeh/util/options.pyR	   D   s
    N(   t   __name__t
   __module__t   __doc__t   NoneR	   (    (    (    s1   lib/python2.7/site-packages/bokeh/util/options.pyR   +   s   (   u   Options(   R   t
   __future__R    R   R   R   t   loggingt	   getLoggerR   t   logt   core.has_propsR   t   __all__R   (    (    (    s1   lib/python2.7/site-packages/bokeh/util/options.pyt   <module>
   s   "