[Erp5-report] r15314 - /erp5/trunk/utils/treenalyser.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 25 23:03:46 CEST 2007
Author: vincent
Date: Wed Jul 25 23:03:46 2007
New Revision: 15314
URL: http://svn.erp5.org?rev=15314&view=rev
Log:
Use constant names independant from value, but dependant on their use.
Modified:
erp5/trunk/utils/treenalyser.py
Modified: erp5/trunk/utils/treenalyser.py
URL: http://svn.erp5.org/erp5/trunk/utils/treenalyser.py?rev=15314&r1=15313&r2=15314&view=diff
==============================================================================
--- erp5/trunk/utils/treenalyser.py (original)
+++ erp5/trunk/utils/treenalyser.py Wed Jul 25 23:03:46 2007
@@ -50,8 +50,8 @@
EMPTY_STRING = ''
# Range of ASCII characters which are possible to display, used in hex code
# display.
-SPACE_ORD = ord(' ')
-TILDE_ORD = ord('~')
+FIRST_VISIBLE_ASCII = ' '
+LAST_VISIBLE_ASCII = '~'
def find_path_dict(objekt, maximum_depth=-1, objekt_path=EMPTY_STRING,
depth=0):
@@ -180,7 +180,7 @@
byte = data[column_number + offset]
byte_value = ord(byte)
outstring_list[column_number] = '%02x' % (byte_value, )
- if SPACE_ORD <= byte_value <= TILDE_ORD:
+ if FIRST_VISIBLE_ASCII <= byte_value <= LAST_VISIBLE_ASCII:
ascii_list[column_number] = '%s' % (byte, )
else:
ascii_list[column_number] = '.'
More information about the Erp5-report
mailing list