Package qm :: Package external :: Package DocumentTemplate :: Module pDocumentTemplate :: Class TemplateDict
[hide private]
[frames] | no frames]

Class TemplateDict

source code

Nested Classes [hide private]
  float
float(x) -> floating point number
  int
int(x[, base]) -> integer
  str
str(object) -> string
Instance Methods [hide private]
 
_pop(self, n=1) source code
 
_push(self, d) source code
 
__init__(self) source code
 
__getitem__(self, key, call=1, simple=<built-in method has_key of dict object at 0x16c03d0>, isFunctionType=<built-in method has_key of dict object at 0x16c0190>) source code
 
has_key(self, key) source code
 
getitem(self, key, call=1, simple=<built-in method has_key of dict object at 0x16c03d0>, isFunctionType=<built-in method has_key of dict object at 0x16c0190>) source code
 
__call__(self, *args, **kw) source code
number
abs(number)
Return the absolute value of the argument.
 
attr(self, inst, name, md) source code
character
chr(i)
Return a string of one character with ordinal i; 0 <= i < 256.
(div, mod)
divmod(x, y)
Return the tuple ((x-x%y)/y, x%y).
 
getattr(md, inst, name, default=[]) source code
 
hasattr(md, inst, name) source code
integer
hash(object)
Return a hash value for the object.
string
hex(number)
Return the hexadecimal representation of an integer or long integer.
integer
len(object)
Return the number of items of a sequence or mapping.
value
max(iterable, key=func)
max(a, b, c, ...[, key=func]) -> value
value
min(iterable, key=func)
min(a, b, c, ...[, key=func]) -> value
 
namespace(self, **kw)
Create a tuple consisting of a single instance whose attributes are provided as keyword arguments.
source code
string
oct(number)
Return the octal representation of an integer or long integer.
integer
ord(c)
Return the integer ordinal of a one-character string.
 
pow(self, x, y, z) source code
 
range(md, iFirst, *args) source code
 
render(self, v)
Render an object in the way done by the 'name' attribute
source code
floating point number
round(number, ndigits=...)
Round a number to a given precision in decimal digits (default 0 digits).
 
test(self, *args) source code
Class Variables [hide private]
  level = 0
  None = None
hash(x)
  math
This module is always available.
  random
Random variable generators.
  string
A collection of string operations (most are no longer used).
Method Details [hide private]

divmod(x, y)

 

Return the tuple ((x-x%y)/y, x%y). Invariant: div*y + mod == x.

Returns: (div, mod)

hash(object)

 

Return a hash value for the object. Two objects with the same value have the same hash value. The reverse is not necessarily true, but likely.

Returns: integer

max(iterable, key=func)

 

max(a, b, c, ...[, key=func]) -> value

With a single iterable argument, return its largest item. With two or more arguments, return the largest argument.

Returns: value

min(iterable, key=func)

 

min(a, b, c, ...[, key=func]) -> value

With a single iterable argument, return its smallest item. With two or more arguments, return the smallest argument.

Returns: value

round(number, ndigits=...)

 

Round a number to a given precision in decimal digits (default 0 digits). This always returns a floating point number. Precision may be negative.

Returns: floating point number

Class Variable Details [hide private]

math

This module is always available. It provides access to the mathematical functions defined by the C standard.

Value:
math

random

Random variable generators.

    integers
    --------
           uniform within range

    sequences
    ---------
           pick random element
           pick random sample
           generate random permutation

    distributions on the real line:
    ------------------------------
           uniform
           triangular
           normal (Gaussian)
           lognormal
           negative exponential
           gamma
           beta
           pareto
           Weibull

    distributions on the circle (angles 0 to 2pi)
    ---------------------------------------------
           circular uniform
           von Mises

General notes on the underlying Mersenne Twister core generator:

* The period is 2**19937-1.
* It is one of the most extensively tested generators in existence.
* Without a direct way to compute N steps forward, the semantics of
  jumpahead(n) are weakened to simply jump to another distant state and rely
  on the large period to avoid overlapping sequences.
* The random() method is implemented in C, executes in a single Python step,
  and is, therefore, threadsafe.

Value:
random

string

A collection of string operations (most are no longer used).

Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is now obsolete itself.

Public module variables:

whitespace -- a string containing all characters considered whitespace lowercase -- a string containing all characters considered lowercase letters uppercase -- a string containing all characters considered uppercase letters letters -- a string containing all characters considered letters digits -- a string containing all characters considered decimal digits hexdigits -- a string containing all characters considered hexadecimal digits octdigits -- a string containing all characters considered octal digits punctuation -- a string containing all characters considered punctuation printable -- a string containing all characters considered printable

Value:
string