Movatterモバイル変換
[0]ホーム
converting string to dict ?
Richard Scott Glazermangt7781c at prism.gatech.edu
Thu Apr 12 04:22:27 EDT 2001
Fredrik Lundh <fredrik at pythonware.com> wrote:: Richard Scott Glazerman wrote::> what about exec?? (somebody please let me know if there is something wrong:> with using exec this way, I've used it many times for just that purpose.):>:> >>> a = "{'Name':'Cleopatra'}":> >>> exec 'a = %s' % a:> >>> a:> {'Name': 'Cleopatra'}: a = "__import__('os').system('rm -rf ~')": see my earlier reply to this thread, and the followups to: that post.: Cheers /FAh... from the web, that I understand... I've been using it withDictionaries created locally (for the most part, in passing dictionariesto COM objects).Point well taken.Rich-- Richard Scott GlazermanGeorgia Institute of Technology, Atlanta Georgia, 30332Email:rich at aepi.atlanta.nu"This is the time to remember, 'cause it will not last forever."- Billy Joel, "This is the Time"
More information about the Python-listmailing list
[8]ページ先頭