final question: logging to stdout and updating files

Prasad, Ramit ramit.prasad at jpmorgan.com
Thu Oct 4 18:36:02 EDT 2012


Chris Angelico wrote:
> Sent: Thursday, October 04, 2012 9:28 AM
> To: python-list at python.org
> Subject: Re: final question: logging to stdout and updating files
> 
> On Fri, Oct 5, 2012 at 12:00 AM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
> > That is *terrible* advice. But if you insist on following it, you can
> > optimize *any* Python program to this:
> >
> > # === start code ===
> > pass  # this line is optional
> > # === end code ===
> >
> >
> > There you go. The most heavily optimized, fastest Python program in
> > existence. Sure, it has a few bugs, but boy is it fast!!!
> 
> Not many bugs though! I ran it in my Python 5.2.7 for GNU/Windows
> 256-bit (err, yeah, I borrowed Guido's time machine but had the silly
> thing in reverse... oops) and it worked perfectly, except that
> indentation has moved from "significant" to "mandatory". When I added
> the necessary 5 space indent at the beginning, it correctly created
> world peace, ensured that Australia won the next Test Match, and then
> printed "Hello, world!\n" to stdout. Unfortunately, a bug in your "end
> code" comment meant that the peace it created was by wiping out all
> life, but that's pretty minor in the scheme of things.

Python is a product for Americans! ;) It should ensure America
wins the Test Match....wait, do we even have a cricket team?

> 
> Optimization really is that important, folks!
> 
> ChrisA
> may need to schedule surgical detongueing of his cheek

Think we could get a group rate for c.l.p?

Ramit

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  



More information about the Python-list mailing list