Teaching Programming
superpollo
utente at esempio.net
Tue May 4 07:59:46 EDT 2010
Martin P. Hellwig ha scritto:
> On 05/04/10 11:28, superpollo wrote:
>> Samuel Williams ha scritto:
>>> I personally like indentation.
>>>
>>> I just wonder whether it is an issue that some people will dislike.
> <cut>
>> there might be problems if for example you
>> generate code from a one-line template.
> <cut>
> Well a one-line template code generator are great and such, but if the
> output should be human readable it is necessary to have at least some
> form of mark-up control on it. Like newlines and indentations.
or latex markup, in my case...
> On the other hand if it is only meant to generate executable code,
> generating an interpreted code might not be the best solution for the
> actual problem.
yes, maybe generating code for a *compiler* might be faster but you must
consider overhead due to compilation time, especially if code snippets
are sprinkled by the dozen all over the template file.
> For the corner cases (I can think of a couple) it is good to know you
> can use ';' most of the time.
>
most but not always as i noted (think about loops or function definition)
bye
More information about the Python-list
mailing list