Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
Quoting "Russ P." : > On Jan 23, 6:36 pm, Luis Zarrabeitia wrote: > > > > Makes *no* sense? There's *no* good reason *at all* for the original > > > author to hide or protect internals? > > > > My bad, sorry. > > It makes sense... if the original author is an egotist who believes he > must > >

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Tim Rowe
2009/1/24 Rhodri James : > My experience with medium-sized organisations (50-100 people) is that > either you talk to Fred directly, or it doesn't happen. In particular > the more people (especially PHBs) that get involved, the slower the > change will come and the less like your original requir

Re: RegEx issues

2009-01-24 Thread Gabriel Genellina
En Sat, 24 Jan 2009 19:03:26 -0200, Sean Brown gmail.com> <" escribió: Using python 2.4.4 on OpenSolaris 2008.11 I have the following string created by opening a url that has the following string in it: td[ct] = [[ ... ]];\r\n The ... above is what I'm interested in extracting which is rea

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
Robert Kern wrote: On 2009-01-24 17:00, oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... >>> -1 == True False >>> -1 == False False This works though: >>> if -1: print "OK" OK Af

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Terry Reedy
oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... >>> -1 == True False >>> -1 == False False This works though: >>> if -1: print "OK" OK After some head scratching, I realize

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
Quoting Steven D'Aprano : > On Fri, 23 Jan 2009 21:36:59 -0500, Luis Zarrabeitia wrote: > > > Quoting Steven D'Aprano : > >> Makes *no* sense? There's *no* good reason *at all* for the original > >> author to hide or protect internals? > > > > My bad, sorry. > > It makes sense... if the origina

*.python.org broken?

2009-01-24 Thread tgvaughan
Hi all, Is anybody else having trouble accessing sites (including www, docs, wiki) in the python.org tree, or is it just me? (Or just .au?) Cheers, Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: *.python.org broken?

2009-01-24 Thread r
On Jan 24, 7:06 pm, tgvaug...@gmail.com wrote: > Hi all, > > Is anybody else having trouble accessing sites (including www, docs, > wiki) in the python.org tree, or is it just me? (Or just .au?) > > Cheers, > > Tim No problem here??? -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Russ P.
On Jan 24, 4:17 pm, Luis Zarrabeitia wrote: > Quoting "Russ P." : > > > On Jan 23, 6:36 pm, Luis Zarrabeitia wrote: > > > > > Makes *no* sense? There's *no* good reason *at all* for the original > > > > author to hide or protect internals? > > > > My bad, sorry. > > > It makes sense... if the ori

Re: *.python.org broken?

2009-01-24 Thread Philip Semanchuk
On Jan 24, 2009, at 8:06 PM, tgvaug...@gmail.com wrote: Hi all, Is anybody else having trouble accessing sites (including www, docs, wiki) in the python.org tree, or is it just me? (Or just .au?) No problem here in Durham, NC, USA. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Robert Kern
On 2009-01-24 19:07, Oktay Şafak wrote: Robert Kern wrote: On 2009-01-24 17:00, oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... >>> -1 == True False >>> -1 == False False This works

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Terry Reedy
Oktay Şafak wrote: That's what I'm trying to say: it would be more meaningful if int.__eq__ did a boolean comparison when the other operand is a boolean. For that to be done, int would have to know about its subclass, which generally is bad design. The reason is that when someone writes (-

Re: *.python.org broken?

2009-01-24 Thread tgvaughan
On Jan 25, 12:19 pm, Philip Semanchuk wrote: > On Jan 24, 2009, at 8:06 PM, tgvaug...@gmail.com wrote: > > > Hi all, > > > Is anybody else having trouble accessing sites (including www, docs, > > wiki) in the python.org tree, or is it just me? (Or just .au?) > > No problem here in Durham, NC, USA.

Re: String comparision

2009-01-24 Thread Gabriel Genellina
En Sat, 24 Jan 2009 15:08:08 -0200, S.Selvam Siva escribió: I am developing spell checker for my local language(tamil) using python. I need to generate alternative word list for a miss-spelled word from the dictionary of words.The alternatives must be as much as closer to the miss-spelled wor

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Russ P.
On Jan 24, 5:09 pm, Luis Zarrabeitia wrote: > I didn't say "at all". Those were your words, not mine. > I said that it makes no sense that the power lies on _you_ instead of on _my > team_. And, when I said that, I recall we were talking about the python > language, not C. Once again, if you hav

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread Terry Reedy
Benjamin Peterson wrote: MRAB mrabarnett.plus.com> writes: Does myString[myTuple[0] : myTuple[1]] count as unpacking? If it does, then how about myString.__getslice__(*myTuple)? Please don't use special method names directly and especially not __getslice__(). It's deprecated and will be remov

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread python
Terry, Hi, I'm the OP in question. > the OP should simply write myString[slice(*myTuple)] My tuples define positions in a fixed width string for parsing values. So rather than 'unpacking' tuples, I'm using slice() to directly define actual field positions, eg. field_1 = slice( 4, 7 ) field_2 =

Re: *.python.org broken?

2009-01-24 Thread Tim Chase
Is anybody else having trouble accessing sites (including www, docs, wiki) in the python.org tree, or is it just me? (Or just .au?) I've had problems[1] browsing them (most irksomely, the docs) from Dillo thanks to what are apparently poor handling of IPv6 fallback rules. Dillo gets an IPv6 I

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Rhodri James
On Sun, 25 Jan 2009 00:31:14 -, Tim Rowe wrote: 2009/1/24 Rhodri James : My experience with medium-sized organisations (50-100 people) is that either you talk to Fred directly, or it doesn't happen. In particular the more people (especially PHBs) that get involved, the slower the change

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
I don't see how fixing this makes harder to treat True and False as first-class objects. If doing the right thing takes some special casing then be it, but I don't think it's so. True in ['something', False] In your semantics, this would evaluate to True because ('something' == True) is True.

syntax color lang source code in blogs or website

2009-01-24 Thread Xah Lee
For those of you using emacs, here's the elisp code that allows you to syntax color computer language source code in your blog or website. http://xahlee.org/emacs/elisp_htmlize.html to comment, here: http://xahlee.blogspot.com/2009/01/dehtmlize-source-code-in-emacs-lisp.html Xah ∑ http://xahle

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
Terry Reedy wrote: Oktay Şafak wrote: That's what I'm trying to say: it would be more meaningful if int.__eq__ did a boolean comparison when the other operand is a boolean. For that to be done, int would have to know about its subclass, which generally is bad design. Good point, but of cou

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Xah Lee
Language, Purity, Cult, and Deception Xah Lee, 2009-01-24 [this essay is roughly a 10 years personal retrospect of some languages, in particular Scheme and Haskell.] I learned far more Ocaml in the past 2 days than the fucking 2 months i tried to learn Haskell, with 10 years of “I WANT TO BELIEV

Re: Two import questions in Python 3.0

2009-01-24 Thread Kay Schluehr
On 24 Jan., 18:51, Scott David Daniels wrote: > Kay Schluehr wrote: > > On 24 Jan., 09:21, "Gabriel Genellina" wrote: > >> If you run A.py as a script, it does not "know" it lives inside a package. > >> You must *import* A for it to become aware of the package. > >> Also, the directory containing

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Xah Lee
Addendum: The above is not a terrible insight, but i suppose it should be useful for some application. Today, there's huge number of languages, each screaming ME! To name a few that are talked about by geekers, there's Arc, Clojure, Scalar, F#, Erlang, Ruby, Groovy, Python 3, Perl6. (for a big lis

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
Quoting "Russ P." : > Once again, if you have the source code for the library (and the right > to modify it), how does the "power" lie with the library implementer > rather than you the user? > > You say you don't want to "fork" the library. Let's stipulate for the > sake of argument that a one-

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Russ P.
On Jan 24, 9:54 pm, Luis Zarrabeitia wrote: > Quoting "Russ P." : > > > Once again, if you have the source code for the library (and the right > > to modify it), how does the "power" lie with the library implementer > > rather than you the user? > > > You say you don't want to "fork" the library.

<    1   2