psicons.core.impl

Package psicons :: Package core :: Module impl |
[hide private]
[frames] | no frames]

# Module impl

source code

Internal implementation utilities and details.

This module contains various odds and ends to make development easier. None of the code within should be relied upon as it is subject to change at a whim.

Functions | [hide private]
make_list(x) If this isn't a list, make it one. | source code

Variables | [hide private]
| __package__ = ``'``psicons.core``'``

Function Details | [hide private]

### make_list(x) | source code
If this isn't a list, make it one. Syntactic sugar for allowing method calls to be single elements or lists of elements. For example:
    >>> make_list (1)
    [1]
    >>> make_list ('1')
    ['1']
    >>> make_list ([1, 2])
    [1, 2]
    >>> make_list ((1, 2))
    (1, 2)
Parameters: `x` (list, tuple, other) - a sequence, or a single element to be placed in a sequence Returns: Either the original a parameter if a sequence, or the parameter placed in a list.