Home | Trees | Indices | Help |
---|
|
Internal implementation utilities and details.
This module contains various odds and ends to make development easier. None of code within should be relied upon as it is subject to change at a whim.
|
|||
|
|||
|
|
|||
__package__ =
|
|
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)
|
Clean-up minor string variants to a single form. This is syntactic sugar for mapping minor string variants (mostly whitespace and punctuation flourishes, as you expect in user input or free text) to a single canonical from. This consists of trimming flanking spaces, making the string uppercase, and collapsing all internal spaces / hyphens / underscores to a single underscore. For example: >>> make_canonical ('abc') 'ABC' >>> make_canonical (' CD-EF ') 'CD_EF' >>> make_canonical ('H-IJ- _K') 'H_IJ_K'
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Jul 22 15:13:45 2011 | http://epydoc.sourceforge.net |