[Python-checkins] CVS: python/nondist/sandbox/typecheck README,1.1,1.2

Paul Prescod prescod@users.sourceforge.net
Tue, 20 Mar 2001 13:02:37 -0800


Update of /cvsroot/python/python/nondist/sandbox/typecheck
In directory usw-pr-cvs1:/tmp/cvs-serv2837

Modified Files:
	README 
Log Message:
Added strict mode. Strict mode is off by default.

This is useful because it means that mistaken  declarations will 
not crash Python. That's important while we work out the "right" 
set of declarations. 


Index: README
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/typecheck/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** README	2001/03/20 03:01:01	1.1
--- README	2001/03/20 21:02:34	1.2
***************
*** 26,30 ****
  but if you aren't, don't blame me!
  
- 
      Basic Usage
  
--- 26,29 ----
***************
*** 35,41 ****
  also be accessible at runtime. For example:
  
! >set PYTHONPATH=C:\pysrc\python\dist\src\Tools\compiler;C:\pysrc\python\nondist\sandbox\typecheck\src
! >python test\testall.py
  
  
  If the package messes something up, delete the ".pyc" files from your
--- 34,43 ----
  also be accessible at runtime. For example:
  
! > set PYTHONPATH=C:\pysrc\python\dist\src\Tools\compiler;C:\pysrc\python\nondist\sandbox\typecheck\src
! > python test\testall.py
  
+ Whenever you want to have Python run without type-checks you can do it
+ like this: "python -O ...". That way you can compare the before and
+ after behaviors.
  
  If the package messes something up, delete the ".pyc" files from your
***************
*** 43,46 ****
--- 45,55 ----
  surprised if it messes something up in the "os" module. Patches are
  welcome.
+ 
+ You can control the strictness of the error checking by changing the
+ PYTHON_STRICT_TYPECHECK environment variable. If it is set to "1",
+ then you will get exceptions instead of just warnings for type errors.
+ You can also change this at runtime with the "typecheck.setstrict(1)"
+ function. One day Python may be strict by default so you should test
+ in this mode to get a feeling for it.
  
      Advanced Usage