Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Since PyDict_GetItem() can't raise an exception any more, there's no | Guido van Rossum | 1998-05-14 | 1 | -4/+1 |
| | | | | need to cxall PyErr_Clear() when it returns NULL. | ||||
* | Make sure that PyDict_GetItem[String]() *never* raises an exception. | Guido van Rossum | 1998-05-14 | 1 | -2/+3 |
| | | | | | If the argument is not a dictionary, simply return NULL. If the hash() on the key fails, clear the error. | ||||
* | Remove a redundant statement from halfbinop(). | Guido van Rossum | 1998-05-13 | 1 | -1/+0 |
| | |||||
* | Tim's quicksort on May 13. | Guido van Rossum | 1998-05-13 | 1 | -1/+1 |
| | |||||
* | Tim's quicksort on May 10. | Guido van Rossum | 1998-05-13 | 1 | -68/+99 |
| | |||||
* | Add check to conjugate() that there are no excess arguments. | Guido van Rossum | 1998-05-07 | 1 | -2/+5 |
| | |||||
* | Ugly band-aid to work around a bug in Linux ftell(). | Guido van Rossum | 1998-05-05 | 1 | -1/+3 |
| | |||||
* | Get rid of the unused ifdefed-out old sort code. | Guido van Rossum | 1998-04-28 | 1 | -76/+0 |
| | |||||
* | If USE_STACKCHECK is defined use PyOS_CheckStack() in the repr and str | Guido van Rossum | 1998-04-28 | 1 | -0/+12 |
| | | | | | | routines. This catches a slightly different set of crashes than the recursive-repr fix. (Jack) | ||||
* | Enable ftruncate() on the Mac. | Guido van Rossum | 1998-04-28 | 1 | -0/+6 |
| | | | | (Jack) | ||||
* | Quicksort retuned by Tim Peters. | Guido van Rossum | 1998-04-28 | 1 | -33/+26 |
| | |||||
* | Clear the error condition set by ftell(). | Guido van Rossum | 1998-04-27 | 1 | -0/+2 |
| | |||||
* | Be less naive about null characters in an object's repr(). | Guido van Rossum | 1998-04-21 | 1 | -2/+2 |
| | |||||
* | Some robustness checks in Py_ReprLeave() in the unlikely event someone | Guido van Rossum | 1998-04-11 | 1 | -0/+4 |
| | | | | has messed with the dictionary or list. | ||||
* | Use Py_Repr{Enter,Leave} to display recursive lists in finite space. | Guido van Rossum | 1998-04-10 | 1 | -1/+20 |
| | | | | (Jeremy will hardly recognize his patch :-) | ||||
* | Use Py_Repr{Enter,Leave} to display recursive dictionaries in finite space. | Guido van Rossum | 1998-04-10 | 1 | -5/+31 |
| | | | | (Jeremy will hardly recognize his patch :-) | ||||
* | Add implementations of Py_Repr{Enter,Leave}. | Guido van Rossum | 1998-04-10 | 1 | -0/+64 |
| | | | | (Jeremy will hardly recognize his patch :-) | ||||
* | Make new gcc -Wall happy | Guido van Rossum | 1998-04-10 | 4 | -7/+13 |
| | |||||
* | Add PyObject_Not(). | Guido van Rossum | 1998-04-09 | 1 | -0/+14 |
| | |||||
* | This was the reason a numeric array to a real power was not working. | Guido van Rossum | 1998-04-03 | 1 | -1/+2 |
| | |||||
* | Subtle fix in the read() code which could cause a read broken up in | Guido van Rossum | 1998-03-18 | 1 | -1/+1 |
| | | | | several pieces to fail... | ||||
* | When we have no setvbuf(), make the file totally unbuffered using | Guido van Rossum | 1998-03-06 | 1 | -1/+4 |
| | | | | setbuf() if a buffer size of 0 or 1 byte is requested. | ||||
* | Of course, I shouldn't have used lseek() to find out the file's | Guido van Rossum | 1998-03-03 | 1 | -6/+3 |
| | | | | | position in new_buffersize(); the correct function to use is ftell(). Thanks to Ben Jackson. | ||||
* | Add back some safeguards on the index elements that were lost in the | Guido van Rossum | 1998-02-25 | 1 | -2/+2 |
| | | | | | | | | | | last patch. Dave Ascher found a case that dumps core without these: def myComparison(x,y): return cmp(x%3,y%7) z = range(12) z.sort(myComparison) | ||||
* | Add internal routine _PyModule_Clear(), which does approximately what | Guido van Rossum | 1998-02-19 | 1 | -1/+50 |
| | | | | | | | | | clear_carefully() used to do in import.c. Differences: leave only __builtins__ alone in the 2nd pass; and don't clear the dictionary (on the theory that as long as there are references left to the dictionary, those might be destructors that might expect __builtins__ to be alive when they run; and __builtins__ can't normally be part of a cycle). | ||||
* | Vladimir Marangozov' performance hack: copy f_builtins from ancestor | Guido van Rossum | 1998-02-19 | 1 | -3/+14 |
| | | | | | | | if the globals are the same. Also, when creating a dummy builtins dictionary, add "None" to it, just to be kind. | ||||
* | Check ferror(), not errno, for fread() error. | Guido van Rossum | 1998-02-19 | 1 | -1/+1 |
| | |||||
* | Instead of "attribute-less object", issue an error message that | Guido van Rossum | 1998-01-19 | 1 | -1/+4 |
| | | | | contains the type of the object and name of the attribute. | ||||
* | Modified quicksort by Raymund Galvin, after studying the GNU libg++ | Guido van Rossum | 1997-12-10 | 1 | -23/+48 |
| | | | | | quicksort. This should be much faster if there are lots of duplicates, and otherwise at least as good. | ||||
* | Change the default repr() and str() of class instance objects to look | Guido van Rossum | 1997-12-03 | 1 | -1/+9 |
| | | | | | like <modulename.classname instance at ...> (to match the repr() of class objects. | ||||
* | Add a new function PyNumber_CoerceEx() which works just like | Guido van Rossum | 1997-11-19 | 1 | -3/+15 |
| | | | | | | | | | | | | | | | | | PyNumber_Coerce() except that when the coercion can't be done and no other exceptions happen, it returns 1 instead of raising an exception. Use this function in PyObject_Compare() to avoid raising an exception simply because two objects with numeric behavior can't be coerced to a common type; instead, proceed with the non-numeric default comparison. Note that this is a somewhat questionable practice -- comparisons for numeric objects shouldn't default to random behavior like this, but it is required for backward compatibility. (Case in point, it broke comparison of kjDict objects to integers in Aaron Watters' kjbuckets extension.) A correct fix (for python 2.0) should involve a different definiton of comparison altogether. | ||||
* | Undo another glitch of the automatic not-so-Grand Renaming; some local | Guido van Rossum | 1997-11-18 | 1 | -10/+10 |
| | | | | | variables called 'coerce' were accidentally renamed to 'PyNumber_Coerce'. Rename them back to coercefunc. | ||||
* | Fix problem discovered by Barry: if you hit ^C to | Guido van Rossum | 1997-11-07 | 1 | -2/+2 |
| | | | | | | | sys.stdin.readline(), you get a fatal error (no current thread). This is because there was a call to PyErr_CheckSignals() while there was no current thread. I wonder how many more of these we find... I bnetter go hunting for PyErr_CheckSignals() now... | ||||
* | Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov) | Guido van Rossum | 1997-10-31 | 1 | -2/+3 |
| | |||||
* | Hack suggested by Matthias Klose to pull in all relevant entry points | Guido van Rossum | 1997-10-31 | 1 | -0/+10 |
| | | | | | | in libmath.a so they are available to mathmodule.so (in case it is shared). While this still gets triggered on Solaris 2.x, this appears to be harmless there. | ||||
* | New CObject from Jim Fulton, adds PyCObject_FromVoidPtrAndDesc() and | Guido van Rossum | 1997-10-21 | 1 | -1/+52 |
| | | | | PyCObject_GetDesc(). | ||||
* | Write a str() function for class objects that returns | Guido van Rossum | 1997-10-20 | 1 | -2/+36 |
| | | | | "modulename.classname" instead of returning the same as repr(). | ||||
* | Correct Barry's fix -- take care of {}.get(0). | Guido van Rossum | 1997-10-20 | 1 | -0/+3 |
| | |||||
* | dict_get(): Fixed a couple of stupid mistakes which caused crashes. | Barry Warsaw | 1997-10-20 | 1 | -8/+2 |
| | | | | Also got rid of some unnecessary code. | ||||
* | Check that all base classes are indeed class objects, rather than | Guido van Rossum | 1997-10-07 | 1 | -5/+30 |
| | | | | expecting the caller to do so. | ||||
* | dict_get(): New method for item access with different semantics than | Barry Warsaw | 1997-10-06 | 1 | -0/+38 |
| | | | | | | | | | __getitem__(). This method never raises an exception; if the key is not in the dictionary, the second (optional) argument is returned. If the second argument is not provided and the key is missing, None is returned. mapp_methods: added "get" method. | ||||
* | Don't intern the key string for getitem and delitem. | Guido van Rossum | 1997-09-29 | 1 | -3/+1 |
| | |||||
* | When creating a class, set its __module__ attribute to the module | Guido van Rossum | 1997-09-12 | 1 | -1/+22 |
| | | | | | whose name is in the current globals' __name__ variable. If __name__ is not set, ignore this. | ||||
* | Patch submitted by Brad Howes (with one bug fixed by me): allow | Guido van Rossum | 1997-09-08 | 1 | -8/+17 |
| | | | | | | arbitrary nested parens in a %(...)X style format. #Also folded two lines and added more detail to the error message for #unsupported format character. | ||||
* | Allow assignments to instance.__dict__ and instance.__class__. The | Guido van Rossum | 1997-08-25 | 1 | -17/+57 |
| | | | | | | | | | | | | former lets you give an instance a set of new instance vars. The latter lets you give it a new class. Both are typechecked and disallowed in restricted mode. For classes, the check for read-only special attributes is tightened so that only assignments to __dict__, __bases__, __name__, __getattr__, __setattr__, and __delattr__ (these could be made to work as well, but I don't know if that's useful -- let's see first whether mucking with instances will help). | ||||
* | Rename roundup() to roundupsize(), as there's a macro roundup() in the | Guido van Rossum | 1997-08-25 | 1 | -2/+2 |
| | | | | | sys/types.h header on many systems that may get pulled in (through WANT_SIGFPE_HANDLER which pulls in signal.h). | ||||
* | Use lseek instead of ftell; compensate by adding BUFSIZE | Guido van Rossum | 1997-08-21 | 1 | -2/+6 |
| | |||||
* | Made lookdict nearly twice as fast, resulting in a 5% overall | Guido van Rossum | 1997-08-18 | 1 | -11/+13 |
| | | | | improvement of pystone. Vladimir Marangozov. | ||||
* | PyTuple_SetItem should require that the tuple's refcnt is one! | Guido van Rossum | 1997-08-17 | 1 | -1/+1 |
| | |||||
* | Fix mixup about PyErr_NoMemory() prototype. | Guido van Rossum | 1997-08-12 | 1 | -4/+8 |
| |