Re: Regarding coding style

2008-03-08 Thread Micah Cowan
[EMAIL PROTECTED] writes: > On Mar 8, 2:38 am, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> On Fri, 07 Mar 2008 20:57:32 -0800, dave_mikesell wrote: >> >> x = get_stuff(store) # Get the stuff what was brought at the store. >> >> > Perfect example of an unnecessary comment.

Re: Regarding coding style

2008-03-07 Thread Micah Cowan
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2008-03-07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> Professional typesetters, using proportional fonts, don't use double- >> spaces because it throws off word spacing and line justification and just >> plain looks ugly. > > They do, however,

Re: Regarding coding style

2008-03-07 Thread Micah Cowan
"K Viltersten" <[EMAIL PROTECTED]> writes: > 2. You should use two spaces after a sentence-ending period. > > For heavens sake, why? I've always been obstructed by the double > blanks but tolerated them. Now, that i read that > it actually is a recommendation, i need to ask about the purpose. AFA

Re: Dual look-up on keys?

2008-03-05 Thread Micah Cowan
[EMAIL PROTECTED] writes: > On Mar 5, 8:03 pm, [EMAIL PROTECTED] wrote: >> On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: >> >> > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> > > Anyway, if (a,b) is a key in dictionary d, can it guarantee >> > > that (b,a) is also in

Re: Classes and modules are singletons?

2008-03-05 Thread Micah Cowan
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I recall that Python guarantees that module objects are singletons, and > that this must hold for any implementation, not just CPython: you can > only ever create one instance of a module via the import mechanism. But > my google-foo is obviously we

Re: Book Recomendations

2008-03-02 Thread Micah Cowan
Tommy Nordgren <[EMAIL PROTECTED]> writes: > On 2 mar 2008, at 01.56, Ira Solomon wrote: > >> I am an experienced programmer (40 years). I've done Algol (if you've >> heard of that you must be old too), PL/1, VB,VBA, a little C, and a >> few other odd languages (e.g. Taskmate). >> I'm interested

Re: Book Recomendations

2008-03-01 Thread Micah Cowan
Ira Solomon <[EMAIL PROTECTED]> writes: > I am an experienced programmer (40 years). I've done Algol (if you've > heard of that you must be old too), PL/1, VB,VBA, a little C, and a > few other odd languages (e.g. Taskmate). > I'm interested in learning Python and have downloaded a slew of books.

Re: Odd behaviour with list comprehension

2008-02-29 Thread Micah Cowan
"Jerry Hill" <[EMAIL PROTECTED]> writes: > On Fri, Feb 29, 2008 at 10:01 PM, Ken Pu <[EMAIL PROTECTED]> wrote: >> Is there a way for me keep the iterating variable in list >> comprehension local to the list comprehension? > > Kind of. You can use a generator expression instead of a list > compr

Re: Odd behaviour with list comprehension

2008-02-29 Thread Micah Cowan
"Ken Pu" <[EMAIL PROTECTED]> writes: > Hi all, > > I observed an interesting yet unpleasant variable scope behaviour with > list comprehension in the following code: > > print [x for x in range(10)] > print x > > It outputs: > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > 9 > > So the list comprehension actu

Snackages [Re: is there enough information?]

2008-02-27 Thread Micah Cowan
Gabriel Genellina wrote: >> Speak not of Wendy's -- they moved into town in my college days... >> The "hot and juicy" was commonly taken to mean: patty dipped in pan >> drippings, then nuked in microwave... And any CompSci person could >> figure out that the "256 different ways" meant one had a

Re: network programming: how does s.accept() work?

2008-02-26 Thread Micah Cowan
Gabriel Genellina wrote: > En Tue, 26 Feb 2008 07:53:24 -0200, 7stud <[EMAIL PROTECTED]> > escribió: > >> --- >> When you surf the Web, say to http://www.google.com, your Web browser >> is a client. The program you contact at Google is a server. When a >> server is run, it sets up business at a ce

Re: network programming: how does s.accept() work?

2008-02-26 Thread Micah Cowan
Grant Edwards wrote: > On 2008-02-26, Micah Cowan <[EMAIL PROTECTED]> wrote: > >> 7stud, what you seem to be missing, and what I'm not sure if anyone has >> clarified for you (I have only skimmed the thread), is that in TCP, >> connections are uniquely ident

Re: network programming: how does s.accept() work?

2008-02-26 Thread Micah Cowan
Hrvoje Niksic wrote: > 7stud <[EMAIL PROTECTED]> writes: > >> When you surf the Web, say to http://www.google.com, your Web browser >> is a client. The program you contact at Google is a server. When a >> server is run, it sets up business at a certain port, say 80 in the >> Web case. It then wait