Package analysis :: Module common
[show private | hide private]
[frames | no frames]

Module analysis.common

Common analysis functions.

Copyright (C) 2005 Paul Boddie <paul@boddie.org.uk>

This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; see the file LICENCE.txt If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Function Summary
  flatten(values)
  get_docstring_name_annotation(node)
Return the NAME annotation from the docstring associated with 'node'.
  has_docstring_annotation(node, name)
Return whether the given 'node' (typically a class, function or method) has a docstring annotation for the given 'name'.
  lclassname(obj)
  ldir(node, name_str)
List the members of the namespace defined for 'node'.
  lname(obj)
  lobj(node, strict)
Return a list of object nodes corresponding to possible values for the given 'node'.
  lref(node, name_str)
Identify nodes within the namespace defined for 'node' using the optional 'name_str' as a path into the namespace (and sub-namespaces).
  ltype(node, name_str)
Identify the possible types within the namespace defined for 'node' using the optional 'name_str' as a path into the namespace (and sub-namespaces).
  unique(values)

Function Details

get_docstring_name_annotation(node)

Return the NAME annotation from the docstring associated with 'node'.

has_docstring_annotation(node, name)

Return whether the given 'node' (typically a class, function or method) has a docstring annotation for the given 'name'.

ldir(node, name_str=None)

List the members of the namespace defined for 'node'. If the optional 'node_str' is defined, use it as a path identifying objects within the namespace (and sub-namespaces).

lobj(node, strict=0)

Return a list of object nodes corresponding to possible values for the given 'node'. If the optional 'strict' parameter is set to a true value, filter out all nodes with no object nodes defined for them.

lref(node, name_str=None)

Identify nodes within the namespace defined for 'node' using the optional 'name_str' as a path into the namespace (and sub-namespaces). If no such path is specified, return a list containing 'node'.

ltype(node, name_str=None)

Identify the possible types within the namespace defined for 'node' using the optional 'name_str' as a path into the namespace (and sub-namespaces). If no such path is specified, return a list containing the possible types of 'node'.

Return a unique list of type nodes. Note that functions are not associated with types and yield no such nodes.

Generated by Epydoc 2.1 on Fri May 19 01:52:26 2006 http://epydoc.sf.net