"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Meaning: Put the assembler into the doc-string of a function.

That has several issues.  One is that you can't do string operations with
it.  Say you wanted some %d, %s etc in the string.  If you use a documentation
generator (eg epydoc) then the code becomes the API documentation for the
function.  Finally it bloats binary distributions.  For example BitPim
is 7-10MB binary distribution, full compressed with all doc strings
removed.  Including doc strings adds another 3MB to the compressed binary
size!

Instead I would suggest looking at the compile/eval/exec builtins in Python
for inspiration.  You can give a string to compile and it gives you something
you can execute later in varying contexts.

Roger 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to