[Subversion] / Extremes / README.txt  

Diff of /Extremes/README.txt

Parent Directory | Revision Log

version 2735, Sat Apr 4 02:06:14 2015 UTC version 2736, Sat Apr 4 02:57:10 2015 UTC
Line 14 
Line 14 
 Some simple usage examples::  Some simple usage examples::
   
     >>> from peak.util.extremes import Min, Max      >>> from peak.util.extremes import Min, Max
     >>> import sys      >>> try:
       ...    from sys import maxint
       ... except ImportError:
       ...    maxint = (1<<64)
   
     >>> Min < -(1<<31)      >>> Min < -maxint
     True      True
     >>> Min < None      >>> Min < None
     True      True
     >>> Min < ''      >>> Min < ''
     True      True
     >>> Max > (1<<31)      >>> Max > maxint
     True      True
     >>> Max > 99999999999999999      >>> Max > 99999999999999999
     True      True
Line 32 
Line 35 
   
 The ``Min`` object compares less than any other object but itself, while the  The ``Min`` object compares less than any other object but itself, while the
 ``Max`` object compares greater than any other object but itself.  Both are  ``Max`` object compares greater than any other object but itself.  Both are
 instances of the ``Extreme`` type.  instances of the ``Extreme`` type, are hashable, and can be used as
   dictionary keys:
   
       >>> x = {Min: 1, Max: 2}
   
 While the original PEP 326 implementation of these extreme values is shorter  While the original PEP 326 implementation of these extreme values is shorter
 than the version used here, it contains a flaw: it does not correctly handle  than the version used here, it contains a flaw: it does not correctly handle


Generate output suitable for use with a patch program
Legend:
Removed from v.2735  
changed lines
  Added in v.2736

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help