<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000080>Consider a data structure (say, an array) that is 
operated on by </FONT><FONT color=#000080>a bunch of functions eg.</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080>def function_A</FONT></DIV>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; global array_G</FONT></DIV>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; do stuff&nbsp;with <FONT 
color=#000080>array_G</FONT></FONT></DIV>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; return</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080>def function_B</FONT></DIV>
<DIV><FONT color=#000080>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; global 
array_G</FONT></DIV></FONT></DIV>
<DIV><FONT color=#000080>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; do stuff&nbsp;with <FONT 
color=#000080>array_G</FONT></FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp; return</DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT color=#000080>def function_C</FONT></DIV>
<DIV>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; global array_G</FONT></DIV></DIV>
<DIV><FONT color=#000080>
<DIV><FONT color=#000080>&nbsp;&nbsp;&nbsp; do stuff&nbsp;with <FONT 
color=#000080>array_G</FONT></FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp; return</DIV>
<DIV>&nbsp;</DIV>
<DIV>The described way is to place the statement 'global' in line 1 of each 
function.&nbsp; On the other hand, wiser heads say that the use of 'global' is 
bad and that reworking the code into classes and objects is better.</DIV>
<DIV>&nbsp;</DIV>
<DIV>What do you think and suggest?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Dinesh</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>