[Python-checkins] CVS: python/nondist/peps pep-0203.txt,1.6,1.7

Thomas Wouters python-dev@python.org
Mon, 14 Aug 2000 12:58:11 -0700


Update of /cvsroot/python/python/nondist/peps
In directory slayer.i.sourceforge.net:/tmp/cvs-serv19789

Modified Files:
	pep-0203.txt 
Log Message:

Spelling fixes and semantic (both ways) corrections by Aahz Maruch, Bjorn
Pettersen and Eric Jacobs.



Index: pep-0203.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0203.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** pep-0203.txt	2000/08/14 16:08:44	1.6
--- pep-0203.txt	2000/08/14 19:58:09	1.7
***************
*** 17,21 ****
      of the feature and outlines changes necessary to support the
      feature.  This PEP summarizes discussions held in mailing list
!     forums, and provides URLs for further information, where
      appropriate.  The CVS revision history of this file contains the
      definitive historical record.
--- 17,21 ----
      of the feature and outlines changes necessary to support the
      feature.  This PEP summarizes discussions held in mailing list
!     forums, and provides URLs for further information where
      appropriate.  The CVS revision history of this file contains the
      definitive historical record.
***************
*** 53,57 ****
  
      To make this possible, a number of new `hooks' are added to Python
!     classes and C extention types, which are called when the object in
      question is used as the left hand side of an augmented assignment
      operation. If the class or type does not implement the `in-place'
--- 53,57 ----
  
      To make this possible, a number of new `hooks' are added to Python
!     classes and C extension types, which are called when the object in
      question is used as the left hand side of an augmented assignment
      operation. If the class or type does not implement the `in-place'
***************
*** 68,76 ****
      There is no `right-hand-side' variant of __add_ab__, because that
      would require for `y' to know how to in-place modify `x', which is
!     an unsafe to say the least. The __add_ab__ hook should behave exactly
!     like __add__, returning the result of the operation (which could
!     be `self') which is to be stored in the variable `x'.
   
!     For C extention types, the `hooks' are members of the
      PyNumberMethods and PySequenceMethods structures, and are called
      in exactly the same manner as the existing non-inplace operations,
--- 68,76 ----
      There is no `right-hand-side' variant of __add_ab__, because that
      would require for `y' to know how to in-place modify `x', which is
!     unsafe to say the least. The __add_ab__ hook should behave similar
!     to __add__, returning the result of the operation (which could be
!     `self') which is to be stored in the variable `x'.
   
!     For C extension types, the `hooks' are members of the
      PyNumberMethods and PySequenceMethods structures, and are called
      in exactly the same manner as the existing non-inplace operations,
***************
*** 90,94 ****
      merely makes these things easier to do.
      
!     Adding augmented assignment will make Pythons syntax more complex. 
      Instead of a single assignment operation, there are now twelve
      assignment operations, eleven of which also perform an binary
--- 90,94 ----
      merely makes these things easier to do.
      
!     Adding augmented assignment will make Python's syntax more complex. 
      Instead of a single assignment operation, there are now twelve
      assignment operations, eleven of which also perform an binary
***************
*** 103,107 ****
          
      are common enough in those languages to make the extra syntax
!     worthwhile, and Python does not have significantly less of those
      expressions. Quite the opposite, in fact, since in Python you can
      also concatenate lists with a binary operator, something that is
--- 103,107 ----
          
      are common enough in those languages to make the extra syntax
!     worthwhile, and Python does not have significantly fewer of those
      expressions. Quite the opposite, in fact, since in Python you can
      also concatenate lists with a binary operator, something that is
***************
*** 119,131 ****
      order to efficiently deal with the available program memory, such
      packages cannot blindly use the current binary operations. Because
!     these operations always create a new character, adding a single
!     item to an existing (large) object would result in copying the
!     entire object (which may cause the application to run out of
!     memory), add the single item, and then possibly delete the
!     original object, depending on reference count.
      
      To work around this problem, the packages currently have to use
      methods or functions to modify an object in-place, which is
!     definately less readable than an augmented assignment expression. 
      Augmented assignment won't solve all the problems for these
      packages, since some operations cannot be expressed in the limited
--- 119,131 ----
      order to efficiently deal with the available program memory, such
      packages cannot blindly use the current binary operations. Because
!     these operations always create a new object, adding a single item
!     to an existing (large) object would result in copying the entire
!     object (which may cause the application to run out of memory), add
!     the single item, and then possibly delete the original object,
!     depending on reference count.
      
      To work around this problem, the packages currently have to use
      methods or functions to modify an object in-place, which is
!     definitely less readable than an augmented assignment expression. 
      Augmented assignment won't solve all the problems for these
      packages, since some operations cannot be expressed in the limited
***************
*** 157,161 ****
      probably needed to finalize this issue.
  
!     For C extention types, the following struct members are added:
      
      To PyNumberMethods:
--- 157,161 ----
      probably needed to finalize this issue.
  
!     For C extension types, the following struct members are added:
      
      To PyNumberMethods:
***************
*** 196,200 ****
  
      The current implementation of augmented assignment[2] adds, in
!     addition to the methods and slots alread covered, 13 new bytecodes
      and 13 new API functions.
      
--- 196,200 ----
  
      The current implementation of augmented assignment[2] adds, in
!     addition to the methods and slots already covered, 13 new bytecodes
      and 13 new API functions.
      
***************
*** 306,310 ****
      [2]
  http://sourceforge.net/patch?func=detailpatch&patch_id=100699&group_id=5470
! 
  
  
--- 306,311 ----
      [2]
  http://sourceforge.net/patch?func=detailpatch&patch_id=100699&group_id=5470
!     [3] PEP 211, Adding New Linear Algebra Operators,
!         http://python.sourceforge.net/peps/pep-0211.html