* Keith Mitchell (Keith.Mitchell at Sun.COM) wrote:
> 
> 
> Glenn Lagasse wrote:
> >Hi Keith,
> >
> >* Keith Mitchell (Keith.Mitchell at Sun.COM) wrote:
> >>>Sarah, Sundar, Karen, Keith and Jack.
> >>>
> >>>All of you had provided us with feedback to the original webrev
> >>>for the VMC project. Thank you again for that!
> >>>
> >>>As a reminder could each of you please confirm that the issues you
> >>>had raised are acceptably addressed in the updated webrev?
> >>>
> >>>http://cr.opensolaris.org/~glagasse/webrev.diffs
> >>Hi Joe & Glenn,
> >>
> >>Sorry for not checking through this earlier!
> >>
> >>It seems like the code beneath im_pop.py's "if __name__ ==
> >>'__main__':" clause is not all properly indented.
> >
> >Odd.  Pylint didn't report any issues after I re-indented the file.  Can
> >you be more specific about what you believe isn't properly indented?
> 
> I believe everything from 358 to EOF needs an extra level of
> indentation, so that those lines fall into the 'if __name__ ==
> "__main__":' clause. As is, the unindented code would get run if the
> file were imported. An unlikely scenario, certainly, but it's best
> if all the 'main' code is consistently indented to be part of that
> 'if' clause.

Ah, I see what you mean now.  Fixed.

> The reason pylint doesn't complain about it: it's a legitimate case
> for a Python module to have code that gets executed on import, and
> code that gets executed only when the file is run as '__main__'. I
> don't think that's what is intended here.

That's good to know.  Thanks Keith!

-- 
Glenn

Reply via email to