MCPcopy Create free account
hub / github.com/PageBot/PageBot / _get_next

Method _get_next

Lib/pagebot/elements/page.py:290–308  ·  view source on GitHub ↗

Answers the page with the next page number the document, relative to self. Create a new page if self is the last page in the self.parent document. Answer None if the self page has no parent. >>> from pagebot.document import Document >>> doc = Document(name='TestDoc',

(self)

Source from the content-addressed store, hash-verified

288 isRight = property(_get_isRight, _set_isRight)
289
290 def _get_next(self):
291 """Answers the page with the next page number the document, relative to
292 self. Create a new page if self is the last page in the self.parent
293 document. Answer None if the self page has no parent.
294
295 >>> from pagebot.document import Document
296 >>> doc = Document(name='TestDoc', autoPages=8)
297 >>> page = doc[5]
298 >>> page.next.pn # Skip any sub-pages with the same page number.
299 (6, 0)
300 >>> page.next.next.pn
301 (7, 0)
302 >>> page.next.prev is page
303 True
304 """
305 if self.parent is None:
306 return None
307
308 return self.parent.nextPage(self)
309
310 next = property(_get_next)
311

Callers

nothing calls this directly

Calls 1

nextPageMethod · 0.80

Tested by

no test coverage detected