예제 #1
0
파일: doc.py 프로젝트: bourbon08/Mathics
 def __init__(self, part, title, doc=None):
     self.part = part
     self.title = title
     self.slug = slugify(title)
     self.doc = doc
     self.sections = []
     self.sections_by_slug = {}
     part.chapters_by_slug[self.slug] = self
예제 #2
0
 def __init__(self, part, title, doc=None):
     self.part = part
     self.title = title
     self.slug = slugify(title)
     self.doc = doc
     self.sections = []
     self.sections_by_slug = {}
     part.chapters_by_slug[self.slug] = self
예제 #3
0
파일: doc.py 프로젝트: bourbon08/Mathics
 def __init__(self, doc, title, is_reference=False):
     self.doc = doc
     self.title = title
     self.slug = slugify(title)
     self.chapters = []
     self.chapters_by_slug = {}
     self.is_reference = is_reference
     self.is_appendix = False
     doc.parts_by_slug[self.slug] = self
예제 #4
0
 def __init__(self, doc, title, is_reference=False):
     self.doc = doc
     self.title = title
     self.slug = slugify(title)
     self.chapters = []
     self.chapters_by_slug = {}
     self.is_reference = is_reference
     self.is_appendix = False
     doc.parts_by_slug[self.slug] = self
예제 #5
0
파일: doc.py 프로젝트: bourbon08/Mathics
 def __init__(self, chapter, title, text, operator=None):
     self.chapter = chapter
     self.title = title
     self.slug = slugify(title)
     if text.count("<dl>") != text.count("</dl>"):
         raise ValueError("Missing opening or closing <dl> tag in "
                          "{} documentation".format(title))
     self.doc = Doc(text)
     self.operator = operator
     chapter.sections_by_slug[self.slug] = self
예제 #6
0
 def __init__(self, chapter, title, text, operator=None):
     self.chapter = chapter
     self.title = title
     self.slug = slugify(title)
     if text.count("<dl>") != text.count("</dl>"):
         raise ValueError("Missing opening or closing <dl> tag in "
                          "{} documentation".format(title))
     self.doc = Doc(text)
     self.operator = operator
     chapter.sections_by_slug[self.slug] = self