It is Good that you have the book because i have a few questions concerning the books again. This book by M. Zelle is getting really difficult shortly after that section (also as i see the examples are getting fewer) but it was easy till that part, so the question is: is it to me or is the rest of the book indeed explained not well(not like the beginning parts)?. Having heard the recommendations on books for beginners i have ordered the book "Core Python Programming" by Wesley Chun, so comparing those two books which one is more suitable (recommended) for a beginner to both python and programming?
<br> Here in our local library, the first edition of "Core python programming" is available so i guess i will use it till I receive the second edition, but i think it might take like a month, if not more till it gets to where i live. Is there much difference between the first and second editions? And also one more book, i haven't ordered it yet, is the "Python from novice to professional" by Magnus Lie Hetland, is it worth ordering and studying for a complete noob?
<br><br> thanks for your answers.<br><br><br><div><span class="gmail_quote">On 8/13/07, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
bhaaluu wrote:<br><br>> The original poster posted a post with the following function:<br>> def dec():<br>> import string<br>> message=raw_input("Enter the message to decode: ")
<br>> result=''<br>> for x in string.split(message):<br>> result=result+chr(eval(x))<br>> return result<br>><br>> print dec()<br>> which is from the book:
<br>> "Python programming: An introduction to CS" by John M. Zelle.<br>><br>> As a Python Noob, I'm obviously ignorant of most of the Python<br>> language, but I wonder why the author of a book would include
<br>> a function that is a "gaping security hole," when the int() function<br>> would do the job just as nicely, and without the security concerns?<br><br>I can't answer for Mr Zelle. Looking at the book, he introduces int(),
<br>float() and long() shortly after the section containing the above example.<br>><br>> Of course, I don't know what context the snippet is in because I<br>> don't have a copy of the book in question. But as a Python Noob,
<br>> I really do appreciate your heads-up about eval(), and I have it<br>> red-flagged as a 'gaping security' concern, and will use it with<br>> extreme caution in the future. =)<br><br>Good. There is almost always a better way to accomplish a task than to
<br>use eval().<br><br>> Now for MY question: Besides eval(), are there other functions that<br>> should be 'red-flagged' as well? I just haven't been around Python<br>> long enough yet to become familiar with all of the Standard Library.
<br>> Correct me if I'm wrong, but with 29 keywords, and over 176 library<br>> functions, Python weighs-in at over 200 Standard "objects"?<br><br>Anything where user input is executed as code is a security hole and
<br>should never be opened to untrusted users.<br>eval()<br>exec<br>execfile()<br><br>come to mind.<br><br>Kent<br>_______________________________________________<br>Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org
</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>