On 8/1/07, beginner <[EMAIL PROTECTED]> wrote:
> On Jul 31, 10:53 pm, beginner <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > This is just a very simple question about a python trick.
> >
> > In perl, I can write __END__ in a file and the perl interpreter will
> > ignore everything below that line. This is very handy when testing my
> > program. Does python have something similar?
> >
> > Thanks,
> > Geoffrey
>
> Thanks everyone for responding. It doesn't look like python has it. I
> would definitely miss it. As Steve said, the nice thing about __END__
> is that things below __END__ do not have to have legit syntax. That
> let me focus on the lines of code I am debugging and do not have to
> worry about some bad syntax down the line. This feature is especially
> handy if I am, saying, replacing modoules or changing data structures.
>

You'll probably find greater gains by embracing the limitation and
using it to help you refactor your code into smaller, more discrete
modules. Many of pythons limitations that beginners complain about are
of this nature.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to