On Mon, Mar 8, 2010 at 9:17 AM, Ron Adam <r...@ronadam.com> wrote: > I like the strings. They are simple and easy to use/read and they don't > have to be created or imported before the parser is defined.
I like them too. I don't see anything unpythonic about them. > That allows me > to put the parser setup right after the 'if __name__ == '__main__':' so it's > easy to find and read. It also allows me to not import or create objects > that may be expensive in either time or resources if I'm not going to use > them. > > Also the strings help separate the parser from the rest of your program in a > much cleaner way. This can make your programs more modular and easier to > modify and maintain. Also in this particular case a typo in the string will be caught just about at the same time as a typo in the name would be caught. -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com