Commit Graph

20 Commits

Author SHA1 Message Date
Guido van Rossum
2e1c09c1fd Removed old Digital Creations copyright/license notices (with
permission from Paul Everitt).  Also removed a few other references to
Digital Creations and changed the remaining ones to Zope Corporation.
2002-04-04 17:52:50 +00:00
Guido van Rossum
77f6a65eb0 Add the 'bool' type and its values 'False' and 'True', as described in
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.
2002-04-03 22:41:51 +00:00
Fred Drake
428e75fc3e Add wrappers around the rich-comparison operations.
This closes SF patch #428320.

Add wrappers to expose "floor" and "true" division.
This closes SF feature request #449093.
2001-08-09 20:14:34 +00:00
Fred Drake
ea4d3f0804 Add invert() and __invert__() as aliases for inv()/__inv__().
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.
2000-09-17 16:09:27 +00:00
Thomas Wouters
f3f33dcf03 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
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 ;)
2000-07-21 06:00:07 +00:00
Fred Drake
0c89d4ec9a Pretensions of the 20th century... remove old-style preprocessor
hackery (/**/), leaving only new-style preprocessor hackery (##).
2000-07-08 04:53:48 +00:00
Fred Drake
5639ba4896 ANSI-fy the sources. 2000-07-08 04:12:08 +00:00
Guido van Rossum
3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum
832f6d2890 Add an alias (and preferred name) "contains" for "sequenceIncludes".
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.
1998-05-22 18:12:59 +00:00
Guido van Rossum
b1ed9c5295 PySequence_In() -> PySequence_Contains(). 1998-05-22 00:54:16 +00:00
Guido van Rossum
99c185e787 Add not_ and __not__. 1998-04-09 17:54:26 +00:00
Guido van Rossum
9efe8ef7a1 #Plug small memory leaks in constructors. 1997-09-03 18:19:40 +00:00
Guido van Rossum
24a49941b3 Some long variables should have been int to match the 'i' format specifier. 1997-08-28 18:11:05 +00:00
Barry Warsaw
19f61ae196 Tabification changes only; the module was already newly named. 1996-12-18 19:50:00 +00:00
Guido van Rossum
36a484fb52 Correct typo -- repeat implements *, not +. 1996-12-05 19:01:16 +00:00
Guido van Rossum
497aedd2ff Get rid of unused local variable. 1996-08-21 23:46:01 +00:00
Guido van Rossum
c9fb47ef08 Added delslice and delitem.
Renamed and, or to and_, or_.
Renamed all internal identifiers so as not to start with '__' (which is
a compiler privilege); remove AIX hack.
1996-08-21 17:40:51 +00:00
Guido van Rossum
1720230399 Made it palatable for K&R preprocessors. The spam macros don't have
to work as hard (but "stringizing" is still used, so we test the newly
introduced HAVE_OLD_CPP config define).
1996-08-19 22:01:39 +00:00
Guido van Rossum
ec185bde77 Added hack to get it to compile on AIX. 1996-08-08 19:12:05 +00:00
Guido van Rossum
037b940cd7 Operators like __add__ 1996-07-30 16:55:54 +00:00