bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def login(self, user, password): """Identify client using plaintext password. | def login(self, user, password): """Identify client using plaintext password. | 19,100 |
def logout(self): """Shutdown connection to server. | def logout(self): """Shutdown connection to server. | 19,101 |
def lsub(self, directory='""', pattern='*'): """List 'subscribed' mailbox names in directory matching pattern. | def lsub(self, directory='""', pattern='*'): """List 'subscribed' mailbox names in directory matching pattern. | 19,102 |
def noop(self): """Send NOOP command. | def noop(self): """Send NOOP command. | 19,103 |
def partial(self, message_num, message_part, start, length): """Fetch truncated part of a message. | def partial(self, message_num, message_part, start, length): """Fetch truncated part of a message. | 19,104 |
def rename(self, oldmailbox, newmailbox): """Rename old mailbox name to new. | def rename(self, oldmailbox, newmailbox): """Rename old mailbox name to new. | 19,105 |
def search(self, charset, criteria): """Search mailbox for matching messages. | def search(self, charset, criteria): """Search mailbox for matching messages. | 19,106 |
def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | 19,107 |
def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | 19,108 |
def status(self, mailbox, names): """Request named status conditions for mailbox. | def status(self, mailbox, names): """Request named status conditions for mailbox. | 19,109 |
def store(self, message_set, command, flag_list): """Alters flag dispositions for messages in mailbox. | def store(self, message_set, command, flag_list): """Alters flag dispositions for messages in mailbox. | 19,110 |
def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, rather than message number. | def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, rather than message number. | 19,111 |
def _append_untagged(self, typ, dat): | def _append_untagged(self, typ, dat): | 19,112 |
def _command(self, name, *args): | def _command(self, name, *args): | 19,113 |
def _command(self, name, *args): | def _command(self, name, *args): | 19,114 |
def _command(self, name, *args): | def _command(self, name, *args): | 19,115 |
def _get_response(self): | def _get_response(self): | 19,116 |
def _get_line(self): | def _get_line(self): | 19,117 |
def _get_line(self): | def _get_line(self): | 19,118 |
def _match(self, cre, s): | def _match(self, cre, s): | 19,119 |
def _untagged_response(self, typ, name): | def _untagged_response(self, typ, name): | 19,120 |
def _untagged_response(self, typ, name): | def _untagged_response(self, typ, name): | 19,121 |
def _trunc(m, s): if len(s) <= m: return s return '%.*s..' % (m, s) | def _trunc(m, s): if len(s) <= m: return s return '%.*s..' % (m, s) | 19,122 |
def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) _mesg(' %s %s\n => %s %s' % (cmd, args, typ, dat)) return dat | 19,123 |
def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | 19,124 |
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request... | def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request... | 19,125 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,126 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,127 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,128 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,129 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,130 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,131 |
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files.... | 19,132 |
def show_compilers (): from distutils.ccompiler import show_compilers show_compilers() | def show_compilers (): from distutils.ccompiler import show_compilers show_compilers() | 19,133 |
def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, where the tuples are (ext_name, build_info), which are converted to Extension inst... | def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, where the tuples are (ext_name, build_info), which are converted to Extension inst... | 19,134 |
def build_extensions (self): | def build_extensions (self): | 19,135 |
def build_extensions (self): | def build_extensions (self): | 19,136 |
def find_swig (self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """ | def find_swig (self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """ | 19,137 |
def safeimport(path, forceload=0, cache={}): """Import a module; handle errors; return None if the module isn't found. If the module *is* found but an exception occurs, it's wrapped in an ErrorDuringImport exception and reraised. Unlike __import__, if a package path is specified, the module at the end of the path is ... | def safeimport(path, forceload=0, cache={}): """Import a module; handle errors; return None if the module isn't found. If the module *is* found but an exception occurs, it's wrapped in an ErrorDuringImport exception and reraised. Unlike __import__, if a package path is specified, the module at the end of the path is ... | 19,138 |
>>> def f(None=1): | >>> def f(None=1): | 19,139 |
>>> def f(x, y=1, z): | >>> def f(x, y=1, z): | 19,140 |
>>> def f(x, None): | >>> def f(x, None): | 19,141 |
>>> def f(*None): | >>> def f(*None): | 19,142 |
>>> def f(**None): | >>> def f(**None): | 19,143 |
>>> def None(x): | >>> def None(x): | 19,144 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,145 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,146 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,147 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,148 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,149 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,150 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,151 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,152 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,153 |
>>> def f(it, *varargs): | >>> def f(it, *varargs): | 19,154 |
def setcontext(context): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = context.copy() threading.currentThread().__decimal_context__ = context | def setcontext(context): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = copy.deepcopy(context) context.clear_flags() threading.currentThread().__decimal_context__ = context | 19,155 |
def setcontext(context, _local=local): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = context.copy() _local.__decimal_context__ = context | def setcontext(context, _local=local): """Set this thread's context to context.""" if context in (DefaultContext, BasicContext, ExtendedContext): context = copy.deepcopy(context) context.clear_flags() _local.__decimal_context__ = context | 19,156 |
def _round_half_even(self, prec, expdiff, context): """Round 5 to even, rest to nearest.""" | def _round_half_even(self, prec, expdiff, context): """Round 5 to even, rest to nearest.""" | 19,157 |
def sqrt(self, context=None): """Return the square root of self. | def sqrt(self, context=None): """Return the square root of self. | 19,158 |
def sqrt(self, context=None): """Return the square root of self. | def sqrt(self, context=None): """Return the square root of self. | 19,159 |
def _iseven(self): """Returns 1 if self is even. Assumes self is an integer.""" if self._exp > 0: return 1 return self._int[-1+self._exp] % 2 == 0 | def _iseven(self): """Returns 1 if self is even. Assumes self is an integer.""" if self._exp > 0: return 1 return self._int[-1+self._exp] % 2 == 0 | 19,160 |
def main(self): | def main(self): | 19,161 |
def main(self): | def main(self): | 19,162 |
typedef struct | typedef struct | 19,163 |
def __init__(self, host = '', port = IMAP4_PORT): self.host = host self.port = port self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command self.tagged_commands = {} # Tagged commands awaiting response self.untagged_responses = {} # {typ: [data, ...], ...} self.continuation_respo... | def __init__(self, host = '', port = IMAP4_PORT): self.host = host self.port = port self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command self.tagged_commands = {} # Tagged commands awaiting response self.untagged_responses = {} # {typ: [data, ...], ...} self.continuation_respo... | 19,164 |
def gettempdir(): """Function to calculate the directory to use.""" global tempdir if tempdir is not None: return tempdir try: pwd = os.getcwd() except (AttributeError, os.error): pwd = os.curdir attempdirs = ['/usr/tmp', '/tmp', pwd] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') e... | def gettempdir(): """Function to calculate the directory to use.""" global tempdir if tempdir is not None: return tempdir try: pwd = os.getcwd() except (AttributeError, os.error): pwd = os.curdir attempdirs = ['/usr/tmp', '/tmp', pwd] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') e... | 19,165 |
def splithost(url): """splithost('//host[:port]/path') --> 'host[:port]', '/path'.""" global _hostprog if _hostprog is None: import re _hostprog = re.compile('^//([^/]*)(.*)$') match = _hostprog.match(url) if match: return match.group(1, 2) return None, url | def splithost(url): """splithost('//host[:port]/path') --> 'host[:port]', '/path'.""" global _hostprog if _hostprog is None: import re _hostprog = re.compile('^//([^/?]*)(.*)$') match = _hostprog.match(url) if match: return match.group(1, 2) return None, url | 19,166 |
def page(self, title, contents): """Format an HTML page.""" return ''' | def page(self, title, contents): """Format an HTML page.""" return ''' | 19,167 |
def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | 19,168 |
def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | def docmodule(self, object, name=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) l... | 19,169 |
def docroutine(self, object, name=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if not cl._... | def docroutine(self, object, name=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if object.i... | 19,170 |
def docroutine(self, object, name=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if not cl._... | def docroutine(self, object, name=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if not cl._... | 19,171 |
def docroutine(self, object, name=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if not cl.__dict__.has_key(name): base = object.im_class basename = base.__name__ if base.__mo... | def docroutine(self, object, name=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): if cl: if object.im_class is not cl: base = object.im_class basename = base.__name__ if base.__module... | 19,172 |
def parse(self, stream_or_string): "Parse an XML document from a URL." if type(stream_or_string) is type(""): stream = open(stream_or_string) else: stream = stream_or_string | def parse(self, stream_or_string): "Parse an XML document from a URL." if type(stream_or_string) is type(""): stream = open(stream_or_string) else: stream = stream_or_string | 19,173 |
def getFeature(self, name): "Looks up and returns the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | def getFeature(self, name): if name == feature_namespaces: return self._namespaces raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | 19,174 |
def setFeature(self, name, state): "Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | def setFeature(self, name, state): "Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | 19,175 |
def getProperty(self, name): "Looks up and returns the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) | def getProperty(self, name): raise SAXNotRecognizedException("Property '%s' not recognized" % name) | 19,176 |
def setProperty(self, name, value): "Sets the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) | def setProperty(self, name, value): raise SAXNotRecognizedException("Property '%s' not recognized" % name) | 19,177 |
def feed(self, data): if not self._parsing: self._parsing = 1 self.reset() self._cont_handler.startDocument() # FIXME: error checking and endDocument() self._parser.Parse(data, 0) | def feed(self, data): if not self._parsing: self._parsing = 1 self.reset() self._cont_handler.startDocument() # FIXME: error checking and endDocument() self._parser.Parse(data, 0) | 19,178 |
def start_element(self, name, attrs): self._cont_handler.startElement(name, name, xmlreader.AttributesImpl(attrs, attrs)) | def start_element(self, name, attrs): self._cont_handler.startElement(name, name, xmlreader.AttributesImpl(attrs, attrs)) | 19,179 |
def end_element(self, name): self._cont_handler.endElement(name, name) | def end_element(self, name): self._cont_handler.endElement(name, name) | 19,180 |
def start_element_ns(self, name, attrs): pair = name.split() if len(pair) == 1: tup = (None, name) else: tup = pair | def start_element_ns(self, name, attrs): pair = name.split() if len(pair) == 1: tup = (None, name) else: tup = pair | 19,181 |
def start_element_ns(self, name, attrs): pair = name.split() if len(pair) == 1: tup = (None, name) else: tup = pair | def start_element_ns(self, name, attrs): pair = name.split() if len(pair) == 1: tup = (None, name) else: tup = pair | 19,182 |
def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name) # prefix is not implemented yet! self._cont_handler.endElement(name, None) | 19,183 |
def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | 19,184 |
def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | 19,185 |
def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) | def processing_instruction(self, target, data): self._cont_handler.processingInstruction(target, data) | 19,186 |
def external_entity_ref(self, context, base, sysid, pubid): assert 0 # not implemented source = self._ent_handler.resolveEntity(pubid, sysid) source = saxutils.prepare_input_source(source) # FIXME: create new parser, stack self._source and self._parser # FIXME: reuse code from self.parse(...) return 1 | def external_entity_ref(self, context, base, sysid, pubid): raise NotImplementedError() # not implemented source = self._ent_handler.resolveEntity(pubid, sysid) source = saxutils.prepare_input_source(source) # FIXME: create new parser, stack self._source and self._parser # FIXME: reuse code from self.parse(...) return ... | 19,187 |
def import_module(self, partname, fqname, parent): self.msgin(3, "import_module", partname, fqname, parent) try: m = self.modules[fqname] except KeyError: pass else: self.msgout(3, "import_module ->", m) return m if self.badmodules.has_key(fqname): self.msgout(3, "import_module -> None") self.badmodules[fqname][parent.... | def import_module(self, partname, fqname, parent): self.msgin(3, "import_module", partname, fqname, parent) try: m = self.modules[fqname] except KeyError: pass else: self.msgout(3, "import_module ->", m) return m if self.badmodules.has_key(fqname): self.msgout(3, "import_module -> None") if parent: self.badmodules[fqna... | 19,188 |
def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | 19,189 |
def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | 19,190 |
def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name pa... | 19,191 |
def runtime_library_dir_option (self, dir): return "-R" + dir | def runtime_library_dir_option (self, dir): return "-R" + dir | 19,192 |
def build_extensions(self): | def build_extensions(self): | 19,193 |
def wait(self, timeout=None): self.__cond.acquire() if not self.__flag: self.__cond.wait(timeout) self.__cond.release() | defwait(self,timeout=None):self.__cond.acquire()ifnotself.__flag:self.__cond.wait(timeout)self.__cond.release() | 19,194 |
def test_mixed_compare(self): our = self.theclass(2000, 4, 5) self.assertRaises(TypeError, cmp, our, 1) self.assertRaises(TypeError, cmp, 1, our) | def test_mixed_compare(self): our = self.theclass(2000, 4, 5) self.assertRaises(TypeError, cmp, our, 1) self.assertRaises(TypeError, cmp, 1, our) | 19,195 |
def __cmp__(self, other): # Return "equal" so calling this can't be confused with # compare-by-address (which never says "equal" for distinct # objects). return 0 | def __cmp__(self, other): # Return "equal" so calling this can't be confused with # compare-by-address (which never says "equal" for distinct # objects). return 0 | 19,196 |
def test_bug_1028306(self): # Trying to compare a date to a datetime should act like a mixed- # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) self.assert_(as_date != as_datetime) self.assert_(as_datetime != as_date) self.assert_(not ... | def test_bug_1028306(self): # Trying to compare a date to a datetime should act like a mixed- # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) self.assert_(as_date != as_datetime) self.assert_(as_datetime != as_date) self.assert_(not ... | 19,197 |
def test_bug_1028306(self): # Trying to compare a date to a datetime should act like a mixed- # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) self.assert_(as_date != as_datetime) self.assert_(as_datetime != as_date) self.assert_(not ... | def test_bug_1028306(self): # Trying to compare a date to a datetime should act like a mixed- # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) self.assert_(as_date != as_datetime) self.assert_(as_datetime != as_date) self.assert_(not ... | 19,198 |
def getwelcome(self): if self.debugging: print '*welcome*', `self.welcome` return self.welcome | def getwelcome(self): if self.debugging: print '*welcome*', self.sanitize(self.welcome) return self.welcome | 19,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.