Back to index

python3.2  3.2.2
Classes | Functions | Variables
pyspecific Namespace Reference

Classes

class  ImplementationDetail
class  PyDecoratorMixin
class  PyDecoratorFunction
class  PyDecoratorMethod
class  DeprecatedRemoved
class  PydocTopicsBuilder

Functions

def new_visit_versionmodified
def issue_role
def source_role
def parse_opcode_signature
def parse_pdb_command
def setup

Variables

string ISSUE_URI = 'http://bugs.python.org/issue%s'
string SOURCE_URI = 'http://hg.python.org/cpython/file/3.2/%s'
list pydoc_topic_labels
tuple opcode_sig_re = re.compile(r'(\w+(?:\+\d)?)(?:\s*\((.*)\))?')
tuple pdbcmd_sig_re = re.compile(r'([a-z()!]+)\s*(.*)')

Function Documentation

def pyspecific.issue_role (   typ,
  rawtext,
  text,
  lineno,
  inliner,
  options = {},
  content = [] 
)

Definition at line 42 of file pyspecific.py.

00042 
00043 def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
00044     issue = utils.unescape(text)
00045     text = 'issue ' + issue
00046     refnode = nodes.reference(text, text, refuri=ISSUE_URI % issue)
00047     return [refnode], []
00048 
00049 
00050 # Support for linking to Python source files easily

def pyspecific.new_visit_versionmodified (   self,
  node 
)

Definition at line 26 of file pyspecific.py.

00026 
00027 def new_visit_versionmodified(self, node):
00028     self.body.append(self.starttag(node, 'p', CLASS=node['type']))
00029     text = versionlabels[node['type']] % node['version']
00030     if len(node):
00031         text += ': '
00032     else:
00033         text += '.'
00034     self.body.append('<span class="versionmodified">%s</span>' % text)

def pyspecific.parse_opcode_signature (   env,
  sig,
  signode 
)
Transform an opcode signature into RST nodes.

Definition at line 226 of file pyspecific.py.

00226 
00227 def parse_opcode_signature(env, sig, signode):
00228     """Transform an opcode signature into RST nodes."""
00229     m = opcode_sig_re.match(sig)
00230     if m is None:
00231         raise ValueError
00232     opname, arglist = m.groups()
00233     signode += addnodes.desc_name(opname, opname)
00234     if arglist is not None:
00235         paramlist = addnodes.desc_parameterlist()
00236         signode += paramlist
00237         paramlist += addnodes.desc_parameter(arglist, arglist)
00238     return opname.strip()
00239 
00240 
00241 # Support for documenting pdb commands

def pyspecific.parse_pdb_command (   env,
  sig,
  signode 
)
Transform a pdb command signature into RST nodes.

Definition at line 251 of file pyspecific.py.

00251 
00252 def parse_pdb_command(env, sig, signode):
00253     """Transform a pdb command signature into RST nodes."""
00254     m = pdbcmd_sig_re.match(sig)
00255     if m is None:
00256         raise ValueError
00257     name, args = m.groups()
00258     fullname = name.replace('(', '').replace(')', '')
00259     signode += addnodes.desc_name(name, name)
00260     if args:
00261         signode += addnodes.desc_addname(' '+args, ' '+args)
00262     return fullname
00263 

Here is the call graph for this function:

def pyspecific.setup (   app)

Definition at line 264 of file pyspecific.py.

00264 
00265 def setup(app):
00266     app.add_role('issue', issue_role)
00267     app.add_role('source', source_role)
00268     app.add_directive('impl-detail', ImplementationDetail)
00269     app.add_directive('deprecated-removed', DeprecatedRemoved)
00270     app.add_builder(PydocTopicsBuilder)
00271     app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
00272     app.add_description_unit('opcode', 'opcode', '%s (opcode)',
00273                              parse_opcode_signature)
00274     app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
00275                              parse_pdb_command)
00276     app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
00277     app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
00278     app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
def pyspecific.source_role (   typ,
  rawtext,
  text,
  lineno,
  inliner,
  options = {},
  content = [] 
)

Definition at line 51 of file pyspecific.py.

00051 
00052 def source_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
00053     has_t, title, target = split_explicit_title(text)
00054     title = utils.unescape(title)
00055     target = utils.unescape(target)
00056     refnode = nodes.reference(title, title, refuri=SOURCE_URI % target)
00057     return [refnode], []
00058 
00059 
00060 # Support for marking up implementation details


Variable Documentation

string pyspecific.ISSUE_URI = 'http://bugs.python.org/issue%s'

Definition at line 12 of file pyspecific.py.

tuple pyspecific.opcode_sig_re = re.compile(r'(\w+(?:\+\d)?)(?:\s*\((.*)\))?')

Definition at line 224 of file pyspecific.py.

tuple pyspecific.pdbcmd_sig_re = re.compile(r'([a-z()!]+)\s*(.*)')

Definition at line 242 of file pyspecific.py.

Initial value:
00001 [
00002     'assert', 'assignment', 'atom-identifiers', 'atom-literals',
00003     'attribute-access', 'attribute-references', 'augassign', 'binary',
00004     'bitwise', 'bltin-code-objects', 'bltin-ellipsis-object',
00005     'bltin-null-object', 'bltin-type-objects', 'booleans',
00006     'break', 'callable-types', 'calls', 'class', 'comparisons', 'compound',
00007     'context-managers', 'continue', 'conversions', 'customization', 'debugger',
00008     'del', 'dict', 'dynamic-features', 'else', 'exceptions', 'execmodel',
00009     'exprlists', 'floating', 'for', 'formatstrings', 'function', 'global',
00010     'id-classes', 'identifiers', 'if', 'imaginary', 'import', 'in', 'integers',
00011     'lambda', 'lists', 'naming', 'nonlocal', 'numbers', 'numeric-types',
00012     'objects', 'operator-summary', 'pass', 'power', 'raise', 'return',
00013     'sequence-types', 'shifting', 'slicings', 'specialattrs', 'specialnames',
00014     'string-methods', 'strings', 'subscriptions', 'truth', 'try', 'types',
00015     'typesfunctions', 'typesmapping', 'typesmethods', 'typesmodules',
00016     'typesseq', 'typesseq-mutable', 'unary', 'while', 'with', 'yield'
00017 ]

Definition at line 150 of file pyspecific.py.

string pyspecific.SOURCE_URI = 'http://hg.python.org/cpython/file/3.2/%s'

Definition at line 13 of file pyspecific.py.