Best way to check that you are at the beginning (the end) of an iterable?

Laurent laurent.payot at gmail.com
Thu Sep 8 02:53:36 CEST 2011


Yes of course the use of a boolean variable is obvious but I'm mixing python code with html using Mako templates. In Mako for code readability reasons I try to stick to simple "for" and "if" constructions, and I try to avoid variables declarations inside the html, that's all.  Thanks anyway.



More information about the Python-list mailing list