[Stackless-checkins] CVS: slpdev/src/2.2/src/Demo/classes class.doc, 1.1.1.1, 1.2

Christian Tismer tismer at centera.de
Sat May 1 00:11:33 CEST 2004


Update of /home/cvs/slpdev/src/2.2/src/Demo/classes
In directory centera.de:/tmp/cvs-serv13270/src/Demo/classes

Modified Files:
	class.doc 
Log Message:
checking Python 2.2.3 back in, almost unmodified.
The only modifications are in PCbuild, and the additon of the
new Stackless for 2.3.3 trunk.

Purpose: I will apply all current changes to 2.3.3 back to 2.2.3.
Since I'm unsure how to do this on the current dev trunk by CVS,
and since I never imported 2.2.3 before, I prefer to do it this
way, using the merge program explicitly.


Index: class.doc
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Demo/classes/class.doc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** class.doc	21 Jan 2002 00:55:48 -0000	1.1.1.1
--- class.doc	30 Apr 2004 22:11:28 -0000	1.2
***************
*** 1,110 ****
! New features of classes
! =======================
! 
! A class can implement certain operations that are invoked by special
! syntax (such as subscription or arithmetic operations) by defining
! methods with special names.
! 
! 
! Special methods for any type
! ----------------------------
! 
! __repr__(self) --> string
! 
! Used by the print statement and conversions (reverse quotes) to
! compute the string representation of an object.
! 
! __cmp__(self, other) --> int
! 
! Used by all comparison operations.  Should return -1 if self<other, 0
! if self==other, +1 if self>other.  Due to limitations in the
! interpreter, exceptions raised by comparisons are ignored, and the
! objects will be considered equal in this case.
! 
! 
! Special methods for sequence and mapping types
! ----------------------------------------------
! 
! __len__(self) --> int
! 
! Used by the built-in function len().  Should return the length of the
! object, which should be >= 0.  Also, an object whose __len__() method
! returns 0 
! 
! __getitem__(self, key) --> value
! 
! Used to implement value = self[key].  Note that the special
! interpretation of negative keys (if the class wishes to emulate a
! sequence type) is up to the __getitem__ method.
! 
! __setitem__(self, key, value)
! 
! Used to implement self[key] = value.  Same note as for __getitem__.
! 
! __delitem__(self, key)
! 
! Used to implement del self[key].  Same note as for __getitem__.
! 
! 
! Special methods for sequence types
! ----------------------------------
! 
! __getslice__(self, i, j) --> sequence
! 
! Used to implement self[i:j].  Note that missing i or j are replaced by
! 0 or len(self), respectively, and len(self) has been added to negative
! i or j.
! 
! __setslice__(self, i, j, sequence)
! 
! Used to implement self[i:j] = value.  Same note as for __getslice__.
! 
! __delslice__(self, i, j)
! 
! Used to implement del self[i:j].  Same note as for __getslice__.
! 
! 
! Special methods for numeric types
! ---------------------------------
! 
! __add__, __sub__, __mul__, __div__, __mod__, __divmod__, __pow__,
! __lshift__, __rshift__, __and__, __xor__, __or__
! 
! Used to implement the binary arithmetic operations (divmod and pow are
! called by built-in functions).  All have the call pattern
! func(self, other) --> number.
! 
! __neg__, __pos__, __abs__, __invert__
! 
! Used to implement the unary arithmetic operations (-, +, abs and ~).
! All have the call pattern func(self) --> number.
! 
! __nonzero__(self) --> int
! 
! Used to implement boolean testing.  An alternative name for this
! method is __len__.
! 
! __coerce__(self, other) --> (self1, other1) or None
! 
! Used to implement "mixed-mode" numeric arithmetic.  Either return a
! tuple containing self and other converted to some common type, or None
! if no way of conversion is known.  When the common type would be the
! type of other, it is sufficient to return None, since the interpreter
! will also ask the other object to attempt a coercion (but sometimes,
! if the implementation of the other type cannot be changed, it is
! useful to do the conversion to the other type here).
! 
! __int__(self) --> int
! __long__(self) --> long
! __float__(self) --> float
! 
! Used to implement the built-in functions int(), long() and float().
! 
! 
! Notes
! -----
! 
! Except for __repr__ and __cmp__, when no appropriate method is
! defined, attempts to execute the operation raise an exception.  For
! __repr__ and __cmp__, the traditional interpretations are used
! in this case.
--- 1,110 ----
! New features of classes
! =======================
! 
! A class can implement certain operations that are invoked by special
! syntax (such as subscription or arithmetic operations) by defining
! methods with special names.
! 
! 
! Special methods for any type
! ----------------------------
! 
! __repr__(self) --> string
! 
! Used by the print statement and conversions (reverse quotes) to
! compute the string representation of an object.
! 
! __cmp__(self, other) --> int
! 
! Used by all comparison operations.  Should return -1 if self<other, 0
! if self==other, +1 if self>other.  Due to limitations in the
! interpreter, exceptions raised by comparisons are ignored, and the
! objects will be considered equal in this case.
! 
! 
! Special methods for sequence and mapping types
! ----------------------------------------------
! 
! __len__(self) --> int
! 
! Used by the built-in function len().  Should return the length of the
! object, which should be >= 0.  Also, an object whose __len__() method
! returns 0 
! 
! __getitem__(self, key) --> value
! 
! Used to implement value = self[key].  Note that the special
! interpretation of negative keys (if the class wishes to emulate a
! sequence type) is up to the __getitem__ method.
! 
! __setitem__(self, key, value)
! 
! Used to implement self[key] = value.  Same note as for __getitem__.
! 
! __delitem__(self, key)
! 
! Used to implement del self[key].  Same note as for __getitem__.
! 
! 
! Special methods for sequence types
! ----------------------------------
! 
! __getslice__(self, i, j) --> sequence
! 
! Used to implement self[i:j].  Note that missing i or j are replaced by
! 0 or len(self), respectively, and len(self) has been added to negative
! i or j.
! 
! __setslice__(self, i, j, sequence)
! 
! Used to implement self[i:j] = value.  Same note as for __getslice__.
! 
! __delslice__(self, i, j)
! 
! Used to implement del self[i:j].  Same note as for __getslice__.
! 
! 
! Special methods for numeric types
! ---------------------------------
! 
! __add__, __sub__, __mul__, __div__, __mod__, __divmod__, __pow__,
! __lshift__, __rshift__, __and__, __xor__, __or__
! 
! Used to implement the binary arithmetic operations (divmod and pow are
! called by built-in functions).  All have the call pattern
! func(self, other) --> number.
! 
! __neg__, __pos__, __abs__, __invert__
! 
! Used to implement the unary arithmetic operations (-, +, abs and ~).
! All have the call pattern func(self) --> number.
! 
! __nonzero__(self) --> int
! 
! Used to implement boolean testing.  An alternative name for this
! method is __len__.
! 
! __coerce__(self, other) --> (self1, other1) or None
! 
! Used to implement "mixed-mode" numeric arithmetic.  Either return a
! tuple containing self and other converted to some common type, or None
! if no way of conversion is known.  When the common type would be the
! type of other, it is sufficient to return None, since the interpreter
! will also ask the other object to attempt a coercion (but sometimes,
! if the implementation of the other type cannot be changed, it is
! useful to do the conversion to the other type here).
! 
! __int__(self) --> int
! __long__(self) --> long
! __float__(self) --> float
! 
! Used to implement the built-in functions int(), long() and float().
! 
! 
! Notes
! -----
! 
! Except for __repr__ and __cmp__, when no appropriate method is
! defined, attempts to execute the operation raise an exception.  For
! __repr__ and __cmp__, the traditional interpretations are used
! in this case.


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list