rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
return codecs.mbs_decode(input,self.errors)[0] | return codecs.mbcs_decode(input,self.errors)[0] | def decode(self, input, final=False): return codecs.mbs_decode(input,self.errors)[0] | 73d09e6e47e37bc2c1926f4c829d4acdd37e9e2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/73d09e6e47e37bc2c1926f4c829d4acdd37e9e2a/mbcs.py |
delimiter string. If maxsplit is given, splits into at most maxsplit words. If sep is not specified, any whitespace string is a separator. | delimiter string. If maxsplit is given, splits at no more than maxsplit places (resulting in at most maxsplit+1 words). If sep is not specified, any whitespace string is a separator. | def split(s, sep=None, maxsplit=-1): """split(s [,sep [,maxsplit]]) -> list of strings Return a list of the words in the string s, using sep as the delimiter string. If maxsplit is given, splits into at most maxsplit words. If sep is not specified, any whitespace string is a separator. (split and splitfields are sy... | 1d989d057403d0078c989c52affcf3c4e0d0524f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d989d057403d0078c989c52affcf3c4e0d0524f/string.py |
suffixes_map). | suffix_map). | def guess_type(url): """Guess the type of a file based on its URL. Return value is a tuple (type, encoding) where type is None if the type can't be guessed (no or unknown suffix) or a string of the form type/subtype, usable for a MIME Content-type header; and encoding is None for no encoding or the name of the program... | b21ad5b05f5b0e58bbaa7fe7387fbbd6cfc87120 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b21ad5b05f5b0e58bbaa7fe7387fbbd6cfc87120/mimetypes.py |
def __init__(self, sock): | def __init__(self, sock, debuglevel=0): | def __init__(self, sock): self.fp = sock.makefile('rb', 0) | 98fe92a73e923f679ebda6e70ee985b7650cd60f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/98fe92a73e923f679ebda6e70ee985b7650cd60f/httplib.py |
if self.length == 0: self.close() | def begin(self): if self.msg is not None: # we've already started reading the response return | 98fe92a73e923f679ebda6e70ee985b7650cd60f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/98fe92a73e923f679ebda6e70ee985b7650cd60f/httplib.py | |
if self.length == 0 or len(s) < amt: self.close() | def read(self, amt=None): if self.fp is None: return '' | 98fe92a73e923f679ebda6e70ee985b7650cd60f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/98fe92a73e923f679ebda6e70ee985b7650cd60f/httplib.py | |
response = self.response_class(self.sock) | if self.debuglevel > 0: response = self.response_class(self.sock, self.debuglevel) else: response = self.response_class(self.sock) | def getresponse(self): "Get the response from the server." | 98fe92a73e923f679ebda6e70ee985b7650cd60f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/98fe92a73e923f679ebda6e70ee985b7650cd60f/httplib.py |
"The class no longer supports the debuglevel." pass | self._conn.set_debuglevel(debuglevel) | def set_debuglevel(self, debuglevel): "The class no longer supports the debuglevel." pass | 98fe92a73e923f679ebda6e70ee985b7650cd60f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/98fe92a73e923f679ebda6e70ee985b7650cd60f/httplib.py |
if __debug__: class Foo: version = 1 class Foo: version = 2 class Foo: version = 3 def execfunc(x): exec x in y | def get_namespace(self): """Returns the single namespace bound to this name. | 6e33e13d7addf2321a96d34004ac062d482b5cbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e33e13d7addf2321a96d34004ac062d482b5cbc/symtable.py | |
def writeln(self, *args): if args: self.write(*args) | def writeln(self, arg=None): if arg: self.write(arg) | def writeln(self, *args): if args: self.write(*args) self.write('\n') # text-mode streams translate to \r\n if needed | 02eed7545ccf6e419d2e6762bb699f172751c694 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/02eed7545ccf6e419d2e6762bb699f172751c694/unittest.py |
return encode_base64("%s\0%s\0%s" % (user, user, password), eol="") | return encode_base64("\0%s\0%s" % (user, password), eol="") | def encode_plain(user, password): return encode_base64("%s\0%s\0%s" % (user, user, password), eol="") | 54afc385ee15215cafb9c809d6a4579354760e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54afc385ee15215cafb9c809d6a4579354760e16/smtplib.py |
fp = open(temp_filename, 'wt') | mode = 'w' if sys.platform not in ['cygwin']: mode += 't' fp = open(temp_filename, mode) | def setUp (self): fp = open(temp_filename, 'wt') fp.write(TEST_NETRC) fp.close() self.netrc = netrc.netrc(temp_filename) | adc8e5bdadab99d92889ed469f2a65a7afba8d7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/adc8e5bdadab99d92889ed469f2a65a7afba8d7a/test_netrc.py |
del dirs_in_sys_path | def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir, dircase = makepath(sitedir, dir) if not dir... | 29736e21f794527d653f8d63000e9ec30809af7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/29736e21f794527d653f8d63000e9ec30809af7f/site.py | |
data = self.rfile.read(int(self.headers["content-length"])) | max_chunk_size = 10*1024*1024 size_remaining = int(self.headers["content-length"]) L = [] while size_remaining: chunk_size = min(size_remaining, max_chunk_size) L.append(self.rfile.read(chunk_size)) size_remaining -= len(L[-1]) data = ''.join(L) | def do_POST(self): """Handles the HTTP POST request. | 62b2bbe893a247009cb0aa35221cc77320f291c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62b2bbe893a247009cb0aa35221cc77320f291c9/SimpleXMLRPCServer.py |
elif _isfunction(v) or _isclass(v): | elif _isfunction(v) or _isclass(v) or _ismethod(v): | def run__test__(self, d, name): """d, name -> Treat dict d like module.__test__. | 93c6492106baad86aaa09980a7560c2724b8e132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93c6492106baad86aaa09980a7560c2724b8e132/doctest.py |
"dict must be strings, functions " | "dict must be strings, functions, methods, " | def run__test__(self, d, name): """d, name -> Treat dict d like module.__test__. | 93c6492106baad86aaa09980a7560c2724b8e132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93c6492106baad86aaa09980a7560c2724b8e132/doctest.py |
if verbose: print "compiling string with syntax error" | def test_complex_args(self): | exec 'def f(a, a): pass' | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
try: compile("1+*3", "filename", "exec") except SyntaxError, detail: if not detail.filename == "filename": raise TestFailed, "expected 'filename', got %r" % detail.filename | def comp_args((a, b)): return a,b self.assertEqual(comp_args((1, 2)), (1, 2)) | exec 'def f(a, a): pass' | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
try: exec 'def f(a = 0, a = 1): pass' raise TestFailed, "duplicate keyword arguments" except SyntaxError: pass | def comp_args((a, b)=(3, 4)): return a, b self.assertEqual(comp_args((1, 2)), (1, 2)) self.assertEqual(comp_args(), (3, 4)) | exec 'def f(a, a): pass' | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
try: exec 'def f(a): global a; a = 1' raise TestFailed, "variable is global and local" except SyntaxError: pass | def comp_args(a, (b, c)): return a, b, c self.assertEqual(comp_args(1, (2, 3)), (1, 2, 3)) | exec 'def f(a = 0, a = 1): pass' | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
if verbose: print "testing complex args" | def comp_args(a=2, (b, c)=(3, 4)): return a, b, c self.assertEqual(comp_args(1, (2, 3)), (1, 2, 3)) self.assertEqual(comp_args(), (2, 3, 4)) | exec 'def f(a): global a; a = 1' | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
def comp_args((a, b)): print a,b | def test_argument_order(self): try: exec 'def f(a=1, (b, c)): pass' self.fail("non-default args after default") except SyntaxError: pass | def comp_args((a, b)): print a,b | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
comp_args((1, 2)) | def test_float_literals(self): self.assertRaises(SyntaxError, eval, "2e") self.assertRaises(SyntaxError, eval, "2.0e+") self.assertRaises(SyntaxError, eval, "1e-") self.assertRaises(SyntaxError, eval, "3-4e/21") | def comp_args((a, b)): print a,b | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
def comp_args((a, b)=(3, 4)): print a, b comp_args((1, 2)) comp_args() def comp_args(a, (b, c)): print a, b, c comp_args(1, (2, 3)) def comp_args(a=2, (b, c)=(3, 4)): print a, b, c comp_args(1, (2, 3)) comp_args() try: exec 'def f(a=1, (b, c)): pass' raise TestFailed, "non-default args after default" except Synta... | def test_indentation(self): s = """ | def comp_args((a, b)=(3, 4)): print a, b | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
compile(s, "<string>", "exec") | compile(s, "<string>", "exec") def test_literals_with_leading_zeroes(self): for arg in ["077787", "0xj", "0x.", "0e", "090000000000000", "080000000000000", "000000000000009", "000000000000008"]: self.assertRaises(SyntaxError, eval, arg) self.assertEqual(eval("0777"), 511) self.assertEqual(eval("0777L"), 511) self.as... | def expect_error(s): try: eval(s) raise TestFailed("%r accepted" % s) except SyntaxError: pass | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
if verbose: print "testing literals with leading zeroes" | def test_main(): test_support.run_unittest(TestSpecifics) | def expect_error(s): try: eval(s) raise TestFailed("%r accepted" % s) except SyntaxError: pass | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
def expect_same(test_source, expected): got = eval(test_source) if got != expected: raise TestFailed("eval(%r) gave %r, but expected %r" % (test_source, got, expected)) expect_error("077787") expect_error("0xj") expect_error("0x.") expect_error("0e") expect_same("0777", 511) expect_same("0777L", 511) expect_same("0007... | if __name__ == "__main__": test_main() | def expect_same(test_source, expected): got = eval(test_source) if got != expected: raise TestFailed("eval(%r) gave %r, but expected %r" % (test_source, got, expected)) | cfaee582698839a2f4c5a779f9a4b3f30c7efa67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cfaee582698839a2f4c5a779f9a4b3f30c7efa67/test_compile.py |
import warnings warnings.warn("cookielib bug!", stacklevel=2) import traceback traceback.print_exc() | import warnings, traceback, StringIO f = StringIO.StringIO() traceback.print_exc(None, f) msg = f.getvalue() warnings.warn("cookielib bug!\n%s" % msg, stacklevel=2) | def reraise_unmasked_exceptions(unmasked=()): # There are a few catch-all except: statements in this module, for # catching input that's bad in unexpected ways. # This function re-raises some exceptions we don't want to trap. unmasked = unmasked + (KeyboardInterrupt, SystemExit, MemoryError) etype = sys.exc_info()[0] i... | 595abd2da7567fc83be31c68ccc709464f0147af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/595abd2da7567fc83be31c68ccc709464f0147af/cookielib.py |
if timeout is None: waiter.acquire() if __debug__: self._note("%s.wait(): got it", self) else: endtime = _time() + timeout delay = 0.000001 while 1: gotit = waiter.acquire(0) if gotit or _time() >= endtime: break _sleep(delay) if delay < 1.0: delay = delay * 2.0 if not gotit: | try: if timeout is None: waiter.acquire() | def wait(self, timeout=None): me = currentThread() assert self._is_owned(), "wait() of un-acquire()d lock" waiter = _allocate_lock() waiter.acquire() self.__waiters.append(waiter) saved_state = self._release_save() if timeout is None: waiter.acquire() if __debug__: self._note("%s.wait(): got it", self) else: endtime = ... | 949864a535605826a9c8133398771c382fc4d75e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/949864a535605826a9c8133398771c382fc4d75e/threading.py |
self._note("%s.wait(%s): timed out", self, timeout) try: self.__waiters.remove(waiter) except ValueError: pass | self._note("%s.wait(): got it", self) | def wait(self, timeout=None): me = currentThread() assert self._is_owned(), "wait() of un-acquire()d lock" waiter = _allocate_lock() waiter.acquire() self.__waiters.append(waiter) saved_state = self._release_save() if timeout is None: waiter.acquire() if __debug__: self._note("%s.wait(): got it", self) else: endtime = ... | 949864a535605826a9c8133398771c382fc4d75e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/949864a535605826a9c8133398771c382fc4d75e/threading.py |
if __debug__: self._note("%s.wait(%s): got it", self, timeout) self._acquire_restore(saved_state) | endtime = _time() + timeout delay = 0.000001 while 1: gotit = waiter.acquire(0) if gotit or _time() >= endtime: break _sleep(delay) if delay < 1.0: delay = delay * 2.0 if not gotit: if __debug__: self._note("%s.wait(%s): timed out", self, timeout) try: self.__waiters.remove(waiter) except ValueError: pass else: if __de... | def wait(self, timeout=None): me = currentThread() assert self._is_owned(), "wait() of un-acquire()d lock" waiter = _allocate_lock() waiter.acquire() self.__waiters.append(waiter) saved_state = self._release_save() if timeout is None: waiter.acquire() if __debug__: self._note("%s.wait(): got it", self) else: endtime = ... | 949864a535605826a9c8133398771c382fc4d75e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/949864a535605826a9c8133398771c382fc4d75e/threading.py |
def d22v(a, b, c=1, d=2, *rest): pass | ca34baacf6e3c2ab0a5692eb0f39b5e0995de901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ca34baacf6e3c2ab0a5692eb0f39b5e0995de901/test_grammar.py | ||
"".join(map(lambda i: "0123456789ABCDEF"[i], digits)) + "L" | "".join(map(lambda i: "0123456789abcdef"[i], digits)) + "L" | def slow_format(self, x, base): if (x, base) == (0, 8): # this is an oddball! return "0L" digits = [] sign = 0 if x < 0: sign, x = 1, -x while x: x, r = divmod(x, base) digits.append(int(r)) digits.reverse() digits = digits or [0] return '-'[:sign] + \ {8: '0', 10: '', 16: '0x'}[base] + \ "".join(map(lambda i: "0123456... | c3281563dd6a44a2ed04056618dbb248acf6557c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c3281563dd6a44a2ed04056618dbb248acf6557c/test_long.py |
def flush(self): | def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH): if self.mode == WRITE: self.fileobj.write(self.compress.flush(zlib_mode)) | def flush(self): self.fileobj.flush() | 10794b09cfe2915f4e81b9b48157c5e1b46677b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/10794b09cfe2915f4e81b9b48157c5e1b46677b9/gzip.py |
def dump(*stuff): sys.__stdout__.write(string.join(map(str, stuff), " ") + "\n") | 464bf36919ff2936f8e1224be84fce9759640ede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/464bf36919ff2936f8e1224be84fce9759640ede/PyParse.py | ||
(?: \s+ | ( [^\s[\](){} )+ | [^[\](){} | def dump(*stuff): sys.__stdout__.write(string.join(map(str, stuff), " ") + "\n") | 464bf36919ff2936f8e1224be84fce9759640ede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/464bf36919ff2936f8e1224be84fce9759640ede/PyParse.py |
i = m.end(1) - 1 | p = m.end() i = p-1 while i >= 0 and str[i] in " \t\n": i = i-1 | def _study2(self, _rfind=string.rfind, _find=string.find, _ws=string.whitespace): if self.study_level >= 2: return self._study1() self.study_level = 2 | 464bf36919ff2936f8e1224be84fce9759640ede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/464bf36919ff2936f8e1224be84fce9759640ede/PyParse.py |
p = m.end() | def _study2(self, _rfind=string.rfind, _find=string.find, _ws=string.whitespace): if self.study_level >= 2: return self._study1() self.study_level = 2 | 464bf36919ff2936f8e1224be84fce9759640ede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/464bf36919ff2936f8e1224be84fce9759640ede/PyParse.py | |
prefix = PREFIX prefix_len = len(prefix) | def main(): rcfile = os.path.join(os.path.dirname(refcounts.__file__), os.pardir, "api", "refcounts.dat") outfile = "-" opts, args = getopt.getopt(sys.argv[1:], "o:r:", ["output=", "refcounts="]) for opt, arg in opts: if opt in ("-o", "--output"): outfile = arg elif opt in ("-r", "--refcounts"): rcfile = arg rcdict = r... | bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9/anno-api.py | |
if line[:prefix_len] == prefix: s = string.split(line[prefix_len:], '}', 1)[0] | prefix = None if line.startswith(PREFIX_1): prefix = PREFIX_1 elif line.startswith(PREFIX_2): prefix = PREFIX_2 if prefix: s = line[len(prefix):].split('}', 1)[0] | def main(): rcfile = os.path.join(os.path.dirname(refcounts.__file__), os.pardir, "api", "refcounts.dat") outfile = "-" opts, args = getopt.getopt(sys.argv[1:], "o:r:", ["output=", "refcounts="]) for opt, arg in opts: if opt in ("-o", "--output"): outfile = arg elif opt in ("-r", "--refcounts"): rcfile = arg rcdict = r... | bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9/anno-api.py |
+ line[prefix_len:] | + line[len(prefix):] | def main(): rcfile = os.path.join(os.path.dirname(refcounts.__file__), os.pardir, "api", "refcounts.dat") outfile = "-" opts, args = getopt.getopt(sys.argv[1:], "o:r:", ["output=", "refcounts="]) for opt, arg in opts: if opt in ("-o", "--output"): outfile = arg elif opt in ("-r", "--refcounts"): rcfile = arg rcdict = r... | bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bc91c5e0599ae2e57fa667df3e9c9baf7e5760d9/anno-api.py |
seq, request = rpc.request_queue.get(0) | seq, request = rpc.request_queue.get(block=True, timeout=0.05) | def main(del_exitfunc=False): """Start the Python execution server in a subprocess In the Python subprocess, RPCServer is instantiated with handlerclass MyHandler, which inherits register/unregister methods from RPCHandler via the mix-in class SocketIO. When the RPCServer 'server' is instantiated, the TCPServer initi... | 169648986ea1f11c2c30c3a6c100e5c3583d51ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/169648986ea1f11c2c30c3a6c100e5c3583d51ea/run.py |
time.sleep(0.05) | def main(del_exitfunc=False): """Start the Python execution server in a subprocess In the Python subprocess, RPCServer is instantiated with handlerclass MyHandler, which inherits register/unregister methods from RPCHandler via the mix-in class SocketIO. When the RPCServer 'server' is instantiated, the TCPServer initi... | 169648986ea1f11c2c30c3a6c100e5c3583d51ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/169648986ea1f11c2c30c3a6c100e5c3583d51ea/run.py | |
if len(result) > 1: | if use_all or len(result) > 1: | def group(self, *groups): | ac05b9217476cbeb900cdc3dc005f7f898f83ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ac05b9217476cbeb900cdc3dc005f7f898f83ae8/re.py |
if (type!=float): | if type != float: | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (pow(type(i),0)!=1): | if pow(type(i), 0) != 1: | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (pow(type(i),1)!=type(i)): | if pow(type(i), 1) != type(i): | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (pow(type(0),1)!=type(0)): | if pow(type(0), 1) != type(0): | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (pow(type(1),1)!=type(1)): | if pow(type(1), 1) != type(1): | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py | ||
if (pow(type(i),3)!=i*i*i): | if pow(type(i), 3) != i*i*i: | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
pow2=1 | pow2 = 1 | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (pow(2,i)!=pow2): | if pow(2, i) != pow2: | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (i!=30): pow2=pow2*2 | if i != 30 : pow2 = pow2*2 for othertype in int, long: for i in range(-10, 0) + range(1, 10): ii = type(i) for j in range(1, 11): jj = -othertype(j) try: pow(ii, jj) except ValueError: pass else: raise ValueError, "pow(%s, %s) did not fail" % (ii, jj) for othertype in int, long, float: for i in range(1, 100): zero = ... | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (type==float): il=1 | if type == float: il = 1 | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
elif (type==int): jl=0 elif (type==long): jl,jh = 0, 15 | elif type == int: jl = 0 elif type == long: jl, jh = 0, 15 | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
for j in range(jl,jh+1): | for j in range(jl, jh+1): | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (k!=0): | if k != 0: | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
if (j>=0 and k!=0): o=pow(i,j) % k n=pow(i,j,k) if (o!=n): print 'Integer mismatch:', i,j,k if (j>=0 and k<>0): o=pow(long(i),j) % k n=pow(long(i),j,k) if (o!=n): print 'Long mismatch:', i,j,k if (i>=0 and k<>0): o=pow(float(i),j) % k n=pow(float(i),j,k) if (o!=n): print 'Float mismatch:', i,j,k | if j >= 0 and k != 0: o = pow(i,j) % k n = pow(i,j,k) if o != n: print 'Integer mismatch:', i,j,k if j >= 0 and k <> 0: o = pow(long(i),j) % k n = pow(long(i),j,k) if o != n: print 'Long mismatch:', i,j,k if i >= 0 and k <> 0: o = pow(float(i),j) % k n = pow(float(i),j,k) if o != n: print 'Float mismatch:', i,j,k | def powtest(type): if (type!=float): print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if (pow(type(i),0)!=1): raise ValueError, 'pow('+str(i)+',0) != 1' if (pow(type(i),1)!=type(i)): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if (pow(type(0),1)!=type(0)): raise ValueError, 'pow(0,'+st... | 294a1764c606a701489f3c9bcab5865abf636c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/294a1764c606a701489f3c9bcab5865abf636c26/test_pow.py |
self.file = self.sock.makefile('rb') | if self.file is None: self.file = self.sock.makefile('rb') | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: | 95eac732a5b0f34b39088dd310bc3d807f5bc32f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/95eac732a5b0f34b39088dd310bc3d807f5bc32f/smtplib.py |
try: errcode = string.atoi(code) except ValueError: errcode = -1 break | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: | 95eac732a5b0f34b39088dd310bc3d807f5bc32f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/95eac732a5b0f34b39088dd310bc3d807f5bc32f/smtplib.py | |
try: errcode = string.atoi(code) except(ValueError): errcode = -1 | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: | 95eac732a5b0f34b39088dd310bc3d807f5bc32f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/95eac732a5b0f34b39088dd310bc3d807f5bc32f/smtplib.py | |
On Unix, there are three possible config files: pydistutils.cfg in the Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), .pydistutils.cfg in the user's home directory, and setup.cfg in the current directory. On Windows and Mac OS, there are two possible config files: pydistut... | There are three possible config files: distutils.cfg in the Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg on Windows/Mac, and setup.cfg in the current directory. | def find_config_files (self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they should be parsed. The filenames returned are guaranteed to exist (modulo nasty race conditions). | 0574e576a0658179a19dc1f66d98c52dae198c4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0574e576a0658179a19dc1f66d98c52dae198c4b/dist.py |
eq(msg.epilogue, '\n\n') | eq(msg.epilogue, '\n') | def test_mondo_message(self): eq = self.assertEqual neq = self.ndiffAssertEqual msg = self._msgobj('crispin-torture.txt') payload = msg.get_payload() eq(type(payload), ListType) eq(len(payload), 12) eq(msg.preamble, None) eq(msg.epilogue, '\n\n') # Probably the best way to verify the message is parsed correctly is to #... | 90a0fa8c3a160e323f5a5a6bd0621b4a9a802034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/90a0fa8c3a160e323f5a5a6bd0621b4a9a802034/test_email_torture.py |
existed = sectdict.has_key(key) | existed = sectdict.has_key(option) | def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | 27409c95b33b971c499c359698bbd01a7181f64b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27409c95b33b971c499c359698bbd01a7181f64b/ConfigParser.py |
del sectdict[key] | del sectdict[option] | def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | 27409c95b33b971c499c359698bbd01a7181f64b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27409c95b33b971c499c359698bbd01a7181f64b/ConfigParser.py |
def subconvert(line, ofp, table, discards, autoclosing, endchar=None): stack = [] while line: if line[0] == endchar and not stack: return line[1:] m = _comment_rx.match(line) if m: text = m.group(1) if text: ofp.write("(COMMENT\n") ofp.write("- %s \n" % encode(text)) ofp.write(")COMMENT\n") ofp.write("-\\n\n") | a00fc9c25eae87b8013ff011fc5a39e2a0f14bed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00fc9c25eae87b8013ff011fc5a39e2a0f14bed/latex2esis.py | ||
subconvert(ifp.read(), ofp, table, discards, autoclosing) | subconvert(data, ofp, table, discards, autoclosing) | def convert(ifp, ofp, table={}, discards=(), autoclosing=()): try: subconvert(ifp.read(), ofp, table, discards, autoclosing) except IOError, (err, msg): if err != errno.EPIPE: raise | a00fc9c25eae87b8013ff011fc5a39e2a0f14bed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a00fc9c25eae87b8013ff011fc5a39e2a0f14bed/latex2esis.py |
"calling %s returned %s, not a test" % obj,test | "calling %s returned %s, not a test" % (obj,test) | def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier. | 7e911725dcd06f01daec1d3c86a322d0e0df7875 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7e911725dcd06f01daec1d3c86a322d0e0df7875/unittest.py |
<type 'None'> | <type 'NoneType'> | ... def g(): | 7329df3f9216b798b095b56b2b5a9cb2a58b5c52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7329df3f9216b798b095b56b2b5a9cb2a58b5c52/test_generators.py |
<type 'None'> | <type 'NoneType'> | ... def f(self): | 7329df3f9216b798b095b56b2b5a9cb2a58b5c52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7329df3f9216b798b095b56b2b5a9cb2a58b5c52/test_generators.py |
file.warn ("exclude (!) doesn't apply to " + "whole directory trees") | manifest.warn ("exclude (!) doesn't apply to " + "whole directory trees") | def read_manifest (self): | b10371c295a021a94e580e02d59b2b0ffbc3ad4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b10371c295a021a94e580e02d59b2b0ffbc3ad4b/dist.py |
file.warn ("can't have multiple words unless first word " + "('%s') is a directory name" % words[0]) | manifest.warn ("can't have multiple words unless first word " + "('%s') is a directory name" % words[0]) | def read_manifest (self): | b10371c295a021a94e580e02d59b2b0ffbc3ad4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b10371c295a021a94e580e02d59b2b0ffbc3ad4b/dist.py |
file.warn ("no files excluded by '%s'" % pattern) | manifest.warn ("no files excluded by '%s'" % pattern) | def read_manifest (self): | b10371c295a021a94e580e02d59b2b0ffbc3ad4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b10371c295a021a94e580e02d59b2b0ffbc3ad4b/dist.py |
self.sock.send(str) | if self.sock: self.sock.send(str) else: raise SMTPServerDisconnected | def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: print 'send:', `str` self.sock.send(str) | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
(note : multiline responces converted to a single, multiline string) | (note : multiline responces converted to a single, multiline string) | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read responce code. - server response string corresponding to response code | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
print 'reply: retcode (%s); Msg: %s' % (errcode,errmsg) | print 'reply: retcode (%s); Msg: %s' % (errcode,errmsg) | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read responce code. - server response string corresponding to response code | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
""" SMTP 'help' command. Returns help text from server """ | """ SMTP 'help' command. Returns help text from server """ | def help(self): """ SMTP 'help' command. Returns help text from server """ | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
def data(self,msg): """ SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821 """ | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py | ||
def data(self,msg): """ SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821 """ | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py | ||
This method will return normally if the mail is accepted for at least one recipiant .Otherwise it will throw an exception (either SMTPSenderRefused,SMTPRecipientsRefused, or SMTPDataError) That is, if this method does not throw an excception, then someone | This method will return normally if the mail is accepted for at least one recipiant. Otherwise it will throw an exception (either SMTPSenderRefused, SMTPRecipientsRefused, or SMTPDataError) That is, if this method does not throw an exception, then someone | def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
It returns a dictionary , with one entry for each recipient that was refused. | It returns a dictionary , with one entry for each recipient that was refused. | def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
>>> tolist= [ "one@one.org", ... "two@two.org", ... "three@three.org", ... "four@four.org"] | >>> tolist=["one@one.org","two@two.org","three@three.org","four@four.org"] | def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. | In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. | def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
senderr[each]=(code,resp) | senderrs[each]=(code,resp) | def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. | e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py |
if self.elements is XMLParser.elements: self.__fixelements() | def __init__(self): self.reset() if self.elements is XMLParser.elements: self.__fixelements() | e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1/xmllib.py | |
self.syntax_error('reference to unknown entity') | self.syntax_error("reference to unknown entity `&%s;'" % str) | def translate_references(self, data, all = 1): i = 0 while 1: res = amp.search(data, i) if res is None: return data res = ref.match(data, res.start(0)) if res is None: self.syntax_error("bogus `&'") i =i+1 continue i = res.end(0) if data[i - 1] != ';': self.syntax_error("`;' missing after entity/char reference") i = i-... | e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1/xmllib.py |
self.syntax_error('reference to unknown entity') | self.syntax_error("reference to unknown entity `&%s;'" % name) | def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if i > 0: self.__at_start = 0 if self.nomoretags: data = rawdata[i:n] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = n break res = interesting.search(rawdata, i) if res: j = res.start(0) else: j = n if i ... | e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e0b147ddd3da5db3fd41041b0b05157bbbf7a3d1/xmllib.py |
childNodeTypes = (Node.TEXT_NODE, Node.ENTITY_REFERENCE_NODE) | def _getElementsByTagNameNSHelper(parent, nsURI, localName, rc): for node in parent.childNodes: if node.nodeType == Node.ELEMENT_NODE: if ((localName == "*" or node.tagName == localName) and (nsURI == "*" or node.namespaceURI == nsURI)): rc.append(node) _getElementsByTagNameNSHelper(node, nsURI, localName, rc) return r... | 5de284e56e3608700c2fb402aa85e392a6d2fa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5de284e56e3608700c2fb402aa85e392a6d2fa6f/minidom.py | |
childNodeTypes = (Node.ELEMENT_NODE, Node.PROCESSING_INSTRUCTION_NODE, Node.COMMENT_NODE, Node.TEXT_NODE, Node.CDATA_SECTION_NODE, Node.ENTITY_REFERENCE_NODE) | def __delitem__(self, attname_or_tuple): node = self[attname_or_tuple] node.unlink() del self._attrs[node.name] del self._attrsNS[(node.namespaceURI, node.localName)] self.length = len(self._attrs) | 5de284e56e3608700c2fb402aa85e392a6d2fa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5de284e56e3608700c2fb402aa85e392a6d2fa6f/minidom.py | |
childNodeTypes = () | def _get_attributes(self): return AttributeList(self._attrs, self._attrsNS) | 5de284e56e3608700c2fb402aa85e392a6d2fa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5de284e56e3608700c2fb402aa85e392a6d2fa6f/minidom.py | |
childNodeTypes = () | def writexml(self, writer): writer.write("<!--%s-->" % self.data) | 5de284e56e3608700c2fb402aa85e392a6d2fa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5de284e56e3608700c2fb402aa85e392a6d2fa6f/minidom.py | |
childNodeTypes = () | def writexml(self, writer): writer.write("<?%s %s?>" % (self.target, self.data)) | 5de284e56e3608700c2fb402aa85e392a6d2fa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5de284e56e3608700c2fb402aa85e392a6d2fa6f/minidom.py | |
magic = unpack('<i', buf[:4])[0] | magic = unpack('<i', buf[:4])[0] & MASK | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() # Are we big endian or little endian? magic = unpack(... | e7680dc2d35b27df2d3b024c61357b06f19ba8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e7680dc2d35b27df2d3b024c61357b06f19ba8f6/gettext.py |
msgcount &= MASK masteridx &= MASK transidx &= MASK | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() # Are we big endian or little endian? magic = unpack(... | e7680dc2d35b27df2d3b024c61357b06f19ba8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e7680dc2d35b27df2d3b024c61357b06f19ba8f6/gettext.py | |
mend = moff + mlen | moff &= MASK mend = moff + (mlen & MASK) | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() # Are we big endian or little endian? magic = unpack(... | e7680dc2d35b27df2d3b024c61357b06f19ba8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e7680dc2d35b27df2d3b024c61357b06f19ba8f6/gettext.py |
tend = toff + tlen if mend < len(buf) and tend < len(buf): | toff &= MASK tend = toff + (tlen & MASK) if mend < buflen and tend < buflen: | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() # Are we big endian or little endian? magic = unpack(... | e7680dc2d35b27df2d3b024c61357b06f19ba8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e7680dc2d35b27df2d3b024c61357b06f19ba8f6/gettext.py |
if ((localName == "*" or node.tagName == localName) and | if ((localName == "*" or node.localName == localName) and | def _getElementsByTagNameNSHelper(parent, nsURI, localName, rc): for node in parent.childNodes: if node.nodeType == Node.ELEMENT_NODE: if ((localName == "*" or node.tagName == localName) and (nsURI == "*" or node.namespaceURI == nsURI)): rc.append(node) _getElementsByTagNameNSHelper(node, nsURI, localName, rc) return r... | 41933385cff17fe80313d77a9b4c22d0b730ce87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41933385cff17fe80313d77a9b4c22d0b730ce87/minidom.py |
_getElementsByTagNameNSHelper(self, namespaceURI, localName, []) | rc = [] _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) return rc | def getElementsByTagNameNS(self, namespaceURI, localName): _getElementsByTagNameNSHelper(self, namespaceURI, localName, []) | 41933385cff17fe80313d77a9b4c22d0b730ce87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41933385cff17fe80313d77a9b4c22d0b730ce87/minidom.py |
_getElementsByTagNameNSHelper(self, namespaceURI, localName) | rc = [] _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) return rc | def getElementsByTagNameNS(self, namespaceURI, localName): _getElementsByTagNameNSHelper(self, namespaceURI, localName) | 41933385cff17fe80313d77a9b4c22d0b730ce87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41933385cff17fe80313d77a9b4c22d0b730ce87/minidom.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.