Clarified the docstrings for int_to_bytearray() and bytearray_to_int().
llvm-svn: 126877
This commit is contained in:
		
							parent
							
								
									e60baf731b
								
							
						
					
					
						commit
						43e587c1f6
					
				| 
						 | 
					@ -13,9 +13,8 @@ import StringIO
 | 
				
			||||||
def int_to_bytearray(val, bytesize):
 | 
					def int_to_bytearray(val, bytesize):
 | 
				
			||||||
    """Utility function to convert an integer into a bytearray.
 | 
					    """Utility function to convert an integer into a bytearray.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    It returns the bytearray in the little endian format.
 | 
					    It returns the bytearray in the little endian format.  It is easy to get the
 | 
				
			||||||
    It is easy to get the big endian representation, just do
 | 
					    big endian format, just do ba.reverse() on the returned object.
 | 
				
			||||||
    ba.reverse() on the returned bytearray object.
 | 
					 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    from struct import *
 | 
					    from struct import *
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,9 +38,8 @@ def int_to_bytearray(val, bytesize):
 | 
				
			||||||
def bytearray_to_int(bytes, bytesize):
 | 
					def bytearray_to_int(bytes, bytesize):
 | 
				
			||||||
    """Utility function to convert a bytearray into an integer.
 | 
					    """Utility function to convert a bytearray into an integer.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    It interprets the bytearray in the little endian format.
 | 
					    It interprets the bytearray in the little endian format. For a big endian
 | 
				
			||||||
    It is easy to get the big endian representation, just do
 | 
					    bytearray, just do ba.reverse() on the object before passing it in.
 | 
				
			||||||
    ba.reverse() on the bytearray object before passing it in.
 | 
					 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    from struct import *
 | 
					    from struct import *
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue