summaryrefslogtreecommitdiffstats
path: root/Modules/operator.c
Commit message (Collapse)AuthorAgeFilesLines
* Add the 'bool' type and its values 'False' and 'True', as described inGuido van Rossum2002-04-031-7/+13
| | | | | | | | | | | | | PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
* Add wrappers around the rich-comparison operations.Fred Drake2001-08-091-1/+22
| | | | | | | This closes SF patch #428320. Add wrappers to expose "floor" and "true" division. This closes SF feature request #449093.
* Add invert() and __invert__() as aliases for inv()/__inv__().Fred Drake2000-09-171-11/+16
| | | | | | | | Add contains() as alias for __contains__(). Make PyArg_ParseTuple() formats include the function name. Based on patch by Denis S. Otkidach <ods@users.sourceforge.net>, this closes SourceForge patch #101390.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-1/+1
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* Pretensions of the 20th century... remove old-style preprocessorFred Drake2000-07-081-6/+0
| | | | hackery (/**/), leaving only new-style preprocessor hackery (##).
* ANSI-fy the sources.Fred Drake2000-07-081-19/+16
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Add an alias (and preferred name) "contains" for "sequenceIncludes".Guido van Rossum1998-05-221-47/+34
| | | | | | | | Rationalized the doc strings. Also simplify the module initialization -- we don't need a __version__ which is set to "$Rev" :-) and we don't need a fatal error when the initialization fails.
* PySequence_In() -> PySequence_Contains().Guido van Rossum1998-05-221-1/+1
|
* Add not_ and __not__.Guido van Rossum1998-04-091-0/+2
|
* #Plug small memory leaks in constructors.Guido van Rossum1997-09-031-2/+3
|
* Some long variables should have been int to match the 'i' format specifier.Guido van Rossum1997-08-281-3/+3
|
* Tabification changes only; the module was already newly named.Barry Warsaw1996-12-181-32/+37
|
* Correct typo -- repeat implements *, not +.Guido van Rossum1996-12-051-1/+1
|
* Get rid of unused local variable.Guido van Rossum1996-08-211-1/+1
|
* Added delslice and delitem.Guido van Rossum1996-08-211-32/+47
| | | | | | Renamed and, or to and_, or_. Renamed all internal identifiers so as not to start with '__' (which is a compiler privilege); remove AIX hack.
* Made it palatable for K&R preprocessors. The spam macros don't haveGuido van Rossum1996-08-191-46/+53
| | | | | to work as hard (but "stringizing" is still used, so we test the newly introduced HAVE_OLD_CPP config define).
* Added hack to get it to compile on AIX.Guido van Rossum1996-08-081-0/+5
|
* Operators like __add__Guido van Rossum1996-07-301-0/+242