semvec/pypi-packages huggingface dataset:
js.jquery_option_tree 1.3-1
Fanstatic packaging of jquery-option-tree
License: BSD

js.jquery_option_tree
*********************

Introduction
============

This library packages `jquery-option-tree`_ for `fanstatic`_.

.. _`fanstatic`: http://fanstatic.org
.. _`jquery-option-tree`: http://code.google.com/p/jquery-option-tree/

This requires integration between your web framework and ``fanstatic``,
and making sure that the original resources (shipped in the ``resources``
directory in ``js.jquery_option_tree``) are published to some URL.


How to use?
===========


You can import ``jquery_option_tree`` from ``js.jquery_option_tree`` and
``need`` it where you want these resources to be included on a page::

  >>> from js.jquery_option_tree import jquery_option_tree
  >>> jquery_option_tree.need()


CHANGES
=======

1.3-1
-----

-   Add js.jquery to install_requires.

1.3
---

- Initial release.
p2-overload 0.1
Overload python 2 functions with decorator.
License: BSD

Overload
========

Overload python functions to behave diffrently depending on number and types of arguments.


Install
-------

::

    pip install p2-overload


Usage
-----

::

    from overload import *

    # types and number or agrs:
    @overload(int)
    def quantify(n):
        return 'quantify' * n

    @overload(str)
    def quantify(s):
        return s * 2

    @overload(str, int)
    def quantify(s, n):
        return s * n

    assert quantify(2) == 'quantifyquantify'
    assert quantify('bye') == 'byebye'
    assert quantify('xy', 3) == 'xyxyxy'

    # predicates on args
    @overload(int, int)
    def step(start, step):
        return start + step

    @overload(int, callable)
    def step(start, succ):
        return succ(start)

    # use tuple of types
    @overload((list, tuple))
    def twice(coll):
        return coll + coll

    # use custom predicates
    from whatever import _

    @overload(_ < 2) # same as lambda x: x < 2
    def fib(n):
        return n

    @overload(int)
    def fib(n):
        return fib(n-1) + fib(n-2)


TODO
----

- support named and optional arguments
- ellipsis