Package Bio :: Package Phylo :: Module _sugar
[hide private]
[frames] | no frames]

Module _sugar

source code

Short helper functions (syntax sugar) used in Bio.Phylo.

The amount of code in this file should be kept to a minimum.

Functions [hide private]
 
iterlen(items)
Count the number of items in an iterable.
source code
 
trim_str(text, maxlen=60)
Truncate a string to maxlen characters, including ellipsis.
source code
Variables [hide private]
  __package__ = None
hash(x)
Function Details [hide private]

iterlen(items)

source code 

Count the number of items in an iterable.

Exhausts a generator, but doesn't require creating a full list.