def deletePageRange(self, from_page = -<NUM_LIT:1>, to_page = -<NUM_LIT:1>):
pl = list(range(len(self)))<EOL>f = from_page<EOL>t = to_page<EOL>if f == -<NUM_LIT:1>:<EOL><INDENT>f = pl[-<NUM_LIT:1>]<EOL><DEDENT>if t == -<NUM_LIT:1>:<EOL><INDENT>t = pl[-<NUM_LIT:1>]<EOL><DEDENT>if not <NUM_LIT:0> <= f <= t <= pl[-<NUM_LIT:1>]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>for i in range(f, t+<NUM_LIT:1>):<EOL><INDENT>pl.remove(i)<EOL><DEDENT>return self.select(pl)<EOL>
Delete pages from the document. First page is '0', last page is '-1'.