<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=ridTitle>Blank</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>BODY {
        MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff
}
P.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
</STYLE>

<META content="MSHTML 6.00.2800.1586" name=GENERATOR></HEAD>
<BODY id=ridBody 
style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff" 
bgColor=#ffffff background=cid:717572118@10022007-34DE>
<P><SPAN class=717572118-10022007>Hi,</SPAN></P>
<P><SPAN class=717572118-10022007>I read the information&nbsp;at <A 
href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</A>&nbsp;but 
am still not sure how to properly send a question.&nbsp; Will I get an email 
response without joining the list?&nbsp; </SPAN></P>
<P><SPAN class=717572118-10022007>Thanks for&nbsp;any help.</SPAN></P>
<P><SPAN class=717572118-10022007>Les</SPAN></P>
<P><SPAN class=717572118-10022007></SPAN>&nbsp;</P>
<P><SPAN class=717572118-10022007>I thought when I read the 2002 thread 
with&nbsp;the subject (Creating an Identifier or Object Name from a String?), 
that I had found a solution to my problem.&nbsp; But, I can't make the concept 
work for creating an object identifier.&nbsp; </SPAN></P>
<P><SPAN class=717572118-10022007>THIS WORKS</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <P><SPAN class=717572118-10022007>class nsf(object):<BR>&nbsp;&nbsp;&nbsp; # 
  name = ''<BR>&nbsp;&nbsp;&nbsp; def __init__(self, 
  id):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.name = id 
  <BR>&nbsp;<BR># main<BR>Ireland = nsf('Ireland')</SPAN></P></BLOCKQUOTE>
<P><SPAN class=717572118-10022007>BUT - THIS DOESN'T</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <P><SPAN class=717572118-10022007>class nsf(object):<BR>&nbsp;&nbsp;&nbsp; # 
  name = ''<BR>&nbsp;&nbsp;&nbsp; def __init__(self, 
  id):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.name = id 
  <BR>&nbsp;<BR># main<BR>cmdstr = "Ireland = 
  nsf('Ireland')"<BR>eval(cmdstr)</SPAN></P></BLOCKQUOTE>
<P><SPAN class=717572118-10022007>-------------------------</SPAN></P>
<P><SPAN class=717572118-10022007>I get an error saying the following</SPAN></P>
<P><SPAN class=717572118-10022007><FONT 
face=Courier>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval(cmdstr)<BR>&nbsp; File 
"(string)", line 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ireland = 
nsf('Ireland')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<BR>SyntaxError: invalid 
syntax</FONT></SPAN></P>
<P><SPAN class=717572118-10022007>-------------------------</SPAN></P>
<P><SPAN class=717572118-10022007>For reference the thread message that I am 
referring to is:</SPAN></P>
<P><SPAN class=717572118-10022007>Gregor Lingl wrote:</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007>I Tried it 
  and it worked (?!)<BR><BR>Python 2.2c1 (#27, Dec 14 2001, 13:15:16) [MSC 32 
  bit (Intel)] on win32<BR>Type "copyright", "credits" or "license" for more 
  information.<BR>IDLE 0.8 -- press F1 for help<BR>&gt;&gt;&gt;<I> class 
  K:<BR></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  pass<BR><BR>&gt;&gt;&gt;<I> field1 = K()<BR></I>&gt;&gt;&gt;<I> field2 = 
  K()<BR></I>&gt;&gt;&gt;<I> field3 = K()<BR></I>&gt;&gt;&gt;<I> for ct in 
  range(1,4):<BR></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  obj="field"+str(ct)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  objTC=eval(obj)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  objTC.text=['a','b',str(ct)]<BR><BR><BR>&gt;&gt;&gt;<I> 
  field1.text<BR></I>['a', 'b', '1']<BR>&gt;&gt;&gt;<I> field2.text<BR></I>['a', 
  'b', '2']<BR>&gt;&gt;&gt;<I> field3.text<BR></I>['a', 'b', 
  '3']<BR>&gt;&gt;&gt;<I><BR></I><BR>Gregor<BR><BR></SPAN><SPAN 
  class=717572118-10022007></SPAN></P></BLOCKQUOTE>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007>What he did 
also works for me. Bur, </SPAN><SPAN class=717572118-10022007>I have tried many 
ways to use the same idea for creating an object identifier.&nbsp; I haven't 
found a way yet.</SPAN></P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN 
class=717572118-10022007></SPAN>&nbsp;</P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007>&nbsp;</P>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"></SPAN>&nbsp;</DIV>
<DIV><P><HR>
The information contained in this communication may be CONFIDENTIAL and is intended only for the use of the recipient(s) named above. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please notify the sender and delete/destroy the original message and any copy of it from your computer or paper files.
</P></DIV>
</BODY></HTML>