Exec Statement Question

Jean-Michel Pichavant jeanmichel at sequans.com
Mon Nov 30 10:22:27 EST 2009


Victor Subervi wrote:
>
>   if which == '':
>     i = 0
>     all = ''
>     while i < len(meanings):
>       table = '%s\n' % meanings[i]
>       table += "<table>\n <tr>\n  <td colspan='8' 
> align='center'>%s</td>\n </tr>" % names[i]
>       j = 0
>       for elt in code:
>         if (j + 8) % 8 == 0:
>           table += ' <tr>\n'
>         table += '  <td>%s</td>\n' % code[i]
>         if (j + 8) % 8 == 0:
>           table += ' </tr>\n'
>         j += 1
>       if table[-6:] != '</tr>\n':
>         table += ' </tr>\n'
>       table += '</table>\n'
>       all += table + '<br /><br />'
>       i += 1
>     print all
>
> This all works fine; however, if there is a better way of doing it, 
> please let me know.
> Thanks,
> V
>

I wonder which is worse, looking at your python code, or being blind :o)
You should have a look at http://tottinge.blogsome.com/meaningfulnames/

Cheers,

Jean-Michel



More information about the Python-list mailing list