direct-io.hg

changeset 7301:813bc65bde2a

Added doccomment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Oct 11 10:30:13 2005 +0100 (2005-10-11)
parents dfadbb90d092
children 1a4f8d6ddd19
files tools/python/xen/util/asserts.py
line diff
     1.1 --- a/tools/python/xen/util/asserts.py	Tue Oct 11 10:29:29 2005 +0100
     1.2 +++ b/tools/python/xen/util/asserts.py	Tue Oct 11 10:30:13 2005 +0100
     1.3 @@ -17,6 +17,11 @@
     1.4  
     1.5  
     1.6  def isCharConvertible(c):
     1.7 +    """Assert that the given value is convertible to a character using the %c
     1.8 +    conversion.  This implies that c is either an integer, or a character
     1.9 +    (i.e. a string of length 1).
    1.10 +    """
    1.11 +    
    1.12      assert (isinstance(c, int) or
    1.13              (isinstance(c, str) and
    1.14               len(c) == 1)), "%s is not convertible to a character" % c