Re: (no) fast boolean evaluation ?

2007-08-03 Thread Frank Swarbrick
Ian Clark wrote: > Stef Mientki wrote: >> hello, >> >> I discovered that boolean evaluation in Python is done "fast" >> (as soon as the condition is ok, the rest of the expression is ignored). >> >> Is this standard behavior or is there a compiler switch to turn it >> on/off ? > > It's called sho

Re: socket.makefile() buggy?

2007-07-09 Thread Frank Swarbrick
ahlongxp wrote: > On Jul 8, 9:54 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> That's a pretty pejorative subject line for someone who's been >> programming Python [guessing by the date of your first post] for about a >> month. >> > I have to admit it that I'm quite a newbie programmer. >> Perhap

Re: socket: connection reset by server before client gets response

2007-07-08 Thread Frank Swarbrick
ahlongxp wrote: >> Post the code. > ok. > here is the code: > > # Echo server program > import socket > > HOST = '' # Symbolic name meaning the local host > PORT = 50007 # Arbitrary non-privileged port > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.setsoc

Re: Python compilation ??

2007-07-03 Thread Frank Swarbrick
John Nagle wrote: > Evan Klitzke wrote: >> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >> >>> Is python a compiler language or interpreted language. If it is >>> interpreter >>> , then why do we have to compile it? >> > Iron Python compiles to Microsoft's byte code as used by their > ".NE

ActivePython

2007-07-03 Thread Frank Swarbrick
Why might one choose to use ActivePython instead of using the free CPython? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tiny/small/minimalist Python?

2007-07-03 Thread Frank Swarbrick
rtk wrote: > > I did look briefly at Python 1.5.2, since it is simpler, but I'm > taking the trouble I've had as an excuse to learn a new language. So > far, I'm liking Lua, save the big pet peeve of starting indices at 1 > and not 0 as all sane people do. Hmm, that in and of itself sounds like

Re: howto resend args and kwargs to other func?

2007-07-01 Thread Frank Swarbrick
dmitrey wrote: > Thanks all, I have solved the problem. Why do people do this without posting what the actual solution is -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a string

2007-07-01 Thread Frank Swarbrick
Alex Martelli wrote: > Martin Durkin <[EMAIL PROTECTED]> wrote: >... > print "\n".join("spam"[::-1]) >... OK, maybe I'm missing the point here as I'm new to Python. The first one seems clearer to me. What am I missing? >>> I think all you are missing is familarity wit

Re: Working with fixed format text db's

2007-06-08 Thread Frank Swarbrick
Neil Cerutti wrote: > The underlying problem, of course, is the archaic flat-file > format with fixed-width data fields. Even the Department of > Education has moved on to XML for most of it's data files, which > are much simpler for me to parse. XML easier to parse than fixed position file. Wow!

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Frank Swarbrick
Tim Roberts wrote: > Frank Swarbrick <[EMAIL PROTECTED]> wrote: >> Then you'd really love COBOL! >> >> :-) >> >> Frank >> COBOL programmer for 10+ years > > Hey, did you hear about the object-oriented version of COBOL? They call it >

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-28 Thread Frank Swarbrick
Roy Smith wrote: > I really like lisp's convention of using dashes instead of underscores, > i.e. ip-address and snmp-manager. I think the only reason most languages > don't use that is the parsing ambiguity, but if you required white space > around all operators, then "ip-address" would unambi