Re: python 3's adoption

2010-01-27 Thread Jonathan Gardner
On Jan 27, 9:38 am, Luis M. González wrote: > > Please don't post more noise and ad hominem attacks to the group, Steve. > > "Ad hominem"? > Please, operor non utor lingua non notus per vulgaris populus. > Gratias ago vos... My rough, machine-assisted translation: "Don't try to use language that

Re: myths about python 3

2010-01-27 Thread Edward A. Falk
In article , Grant Edwards wrote: > >That said, I don't expect to start using Python 3 until library >availability or my Linux distro forces me to. If python 3 is much more efficient than python 2, or it has features I really need for some application I'll write in the future, I might be tempted

Re: python 3's adoption

2010-01-27 Thread Jonathan Gardner
On Jan 26, 10:12 pm, Steven D'Aprano wrote: > > I did too, when I first heard cmp was to be dumped. But I changed my mind > and now agree with the decision to drop cmp. Custom sorts are nearly > always much better written with key rather than cmp: key adds an O(N) > overheard to the sorting, while

Re: python 3's adoption

2010-01-27 Thread Paul Rubin
Steven D'Aprano writes: > always much better written with key rather than cmp: key adds an O(N) > overheard to the sorting, while cmp makes sorting O(N**2). Whaa .. No I don't think so. -- http://mail.python.org/mailman/listinfo/python-list

Updating form action attribute with mechanize.Browser

2010-01-27 Thread cookiecaper
Hi all. I am using mechanize.Browser to download web pages and such. One of these has the wrong URL in the action attribute of the form I need to submit. Anyone know how I can update this quickly? ClientForm.__init__ seems to take the action attribute but that is passed by b.select_form(), I think.

Re: myths about python 3

2010-01-27 Thread Ethan Furman
Daniel Fetchinson wrote: Hi folks, I was going to write this post for a while because all sorts of myths periodically come up on this list about python 3. I don't think the posters mean to spread false information on purpose, they simply are not aware of the facts. My list is surely incomplete,

Re: python 3's adoption

2010-01-27 Thread Jonathan Gardner
On Jan 27, 12:36 am, Paul Rubin wrote: > Steven D'Aprano writes: > > Without becoming a purely functional language, you won't get rid of all > > statements. > > Why not?  GCC lets you use any statement in an expression: > >     #include > >     main() >     { >       int i, x, p=0; >       x = (

Re: python 3's adoption

2010-01-27 Thread Jonathan Gardner
On Jan 27, 3:54 pm, Paul Rubin wrote: > Steven D'Aprano writes: > > always much better written with key rather than cmp: key adds an O(N) > > overheard to the sorting, while cmp makes sorting O(N**2). > > Whaa ..  No I don't think so. You're referring to the O(N**2) bit, right?

Re: myths about python 3

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 12:56:10 -0800, John Nagle wrote: > Daniel Fetchinson wrote: >> Hi folks, >> >> I was going to write this post for a while because all sorts of myths >> periodically come up on this list about python 3. I don't think the >> posters mean to spread false information on purpose,

Stuck on a three word street name regex

2010-01-27 Thread Brian D
I've tackled this kind of problem before by looping through a patterns dictionary, but there must be a smarter approach. Two addresses. Note that the first has incorrectly transposed the direction and street name. The second has an extra space in it before the street type. Clearly done by someone

Re: python 3's adoption

2010-01-27 Thread Paul Rubin
Jonathan Gardner writes: >> What about assert, import, and pass? >... > For instance, how can you call an "if" function ... > If "yield", "break", and "continue" were functions, ... > "import" ... does something very special. It assigns > to values in the namespace of the code from which it was ca

Re: myths about python 3

2010-01-27 Thread Carl Banks
On Jan 27, 2:19 pm, exar...@twistedmatrix.com wrote: > On 10:07 pm, pavlovevide...@gmail.com wrote: > >Last I heard, don't remember where, the plan was for Python 2.7 to be > >the last version in the Python 2 line.  If that's true, Python 3 > >acceptance is further along at this point than anticipa

Re: myths about python 3

2010-01-27 Thread Paul Rubin
Steven D'Aprano writes: > 6. The code for Python 3 was handed down to Guido from the Heavens, > carved into stone tablets by the Gods themselves. That is heresy. The direction was up, not down. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3's adoption

2010-01-27 Thread Paul Rubin
Jonathan Gardner writes: > You're referring to the O(N**2) bit, right? I am sure he knew it was O > (N*log(N)), which is still worse than O(N) for key. It's O(n log n) for both key and cmp. key is usually more convenient and usually gives a constant-factor speedup (DSU pattern), but it uses more

Re: myths about python 3

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 16:25:46 -0500, Benjamin Kaplan wrote: > When Python 2.6 came out, Jython was still on 2.2. The difference > between 2.2 and 2.6 is almost as big of a difference as between 2.6 and > 3.0. In that time, you had the introduction of the boolean type, > generators, list comprehensi

Re: Stuck on a three word street name regex

2010-01-27 Thread Paul Rubin
Brian D writes: > I've tackled this kind of problem before by looping through a patterns > dictionary, but there must be a smarter approach.> > Two addresses. Note that the first has incorrectly transposed the > direction and street name. If you're really serious about it (e.g. you are the p

Re: python 3's adoption

2010-01-27 Thread Carl Banks
On Jan 27, 4:16 pm, Jonathan Gardner wrote: > On Jan 27, 3:54 pm, Paul Rubin wrote: > > > Steven D'Aprano writes: > > > always much better written with key rather than cmp: key adds an O(N) > > > overheard to the sorting, while cmp makes sorting O(N**2). > > > Whaa ..  No I don'

Re: python 3's adoption

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 18:29:25 +0100, Alf P. Steinbach wrote: > The main problem with the incompatibility is for porting code, not for > writing code from scratch. Correct. It's a trivial problem, but still a problem. > It's also a problem wrt. learning the language. This makes no sense. Why is i

Orange County, California Python User Group

2010-01-27 Thread Dan Stromberg
http://www.meetup.com/Orange-County-CA-Python-User-Group/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Orange County, California Python User Group

2010-01-27 Thread Dan Stromberg
On Wed, Jan 27, 2010 at 5:02 PM, Dan Stromberg wrote: > http://www.meetup.com/Orange-County-CA-Python-User-Group/ > Sigh. 'little quick on the trigger there. Anyway, as you might have inferred, I'm attempting to start a Python User Group for Orange County California. If you're interested, ple

Re: python 3's adoption

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 00:36:52 -0800, Paul Rubin wrote: > Steven D'Aprano writes: >> Without becoming a purely functional language, you won't get rid of all >> statements. > > Why not? GCC lets you use any statement in an expression: I stand corrected. Whether it is a good idea or not is another

Re: Stuck on a three word street name regex

2010-01-27 Thread MRAB
Brian D wrote: I've tackled this kind of problem before by looping through a patterns dictionary, but there must be a smarter approach. Two addresses. Note that the first has incorrectly transposed the direction and street name. The second has an extra space in it before the street type. Clearly

Re: myths about python 3

2010-01-27 Thread alex23
Terry Reedy wrote: > Actually, Unladen Swallow is now targeted at 3.1; its developers have > conservatively proposed its integration in CPython 3.3. I would not be > completely shocked if it happens in 3.2. Why do I feel like there's less of an onus on Unladen Swallow to _actually prove itself in

Re: python 3's adoption

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 16:16:59 -0800, Jonathan Gardner wrote: > On Jan 27, 3:54 pm, Paul Rubin wrote: >> Steven D'Aprano writes: >> > always much better written with key rather than cmp: key adds an O(N) >> > overheard to the sorting, while cmp makes sorting O(N**2). >> >> Whaa ..

Re: myths about python 3

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 16:28:08 -0800, Paul Rubin wrote: > Steven D'Aprano writes: >> 6. The code for Python 3 was handed down to Guido from the Heavens, >> carved into stone tablets by the Gods themselves. > > That is heresy. The direction was up, not down. SPLITTER!!! -- Steven -- http://

Re: python 3's adoption

2010-01-27 Thread Steven D'Aprano
On Wed, 27 Jan 2010 16:44:18 -0800, Carl Banks wrote: >> You're referring to the O(N**2) bit, right? I am sure he knew it was O >> (N*log(N)), which is still worse than O(N) for key. >> >> If he didn't, well, Python has some fundamental flaws in its basic sort >> algorithm. > > Quicksort is O(N**

Re: myths about python 3

2010-01-27 Thread Carl Banks
On Jan 27, 5:36 pm, alex23 wrote: > Terry Reedy wrote: > > Actually, Unladen Swallow is now targeted at 3.1; its developers have > > conservatively proposed its integration in CPython 3.3. I would not be > > completely shocked if it happens in 3.2. > > Why do I feel like there's less of an onus o

CodeInvestigator testers

2010-01-27 Thread hans moleman
I need Python programmers to test my Python tracing tool CodeInvestigator please. It records all debug information in a recording phase. The program runs as per usual, albeit a lot slower, while this recording takes place. You can then move anywhere in your code and click words in the code to obta

List weirdness - what the heck is going on here?

2010-01-27 Thread Rotwang
Hi all, I've been trying to make a class with which to manipulate sound data, and have run into some behaviour I don't understand which I hope somebody here can explain. The class has an attribute called data, which is a list with two elements, one for each audio channel, each of which is a lis

Re: deriving MySQLdb class

2010-01-27 Thread tekion
On Jan 21, 11:48 pm, Sean DiZazzo wrote: > On Jan 21, 8:17 pm, tekion wrote: > > > Sean, > > I did a little investigation, there are other classes besides > > Connection. So, could I only set up a derived class from Connection > > and still be able to use the connection to query database and retr

Re: List weirdness - what the heck is going on here?

2010-01-27 Thread Owen Jacobson
On 2010-01-27 21:06:28 -0500, Rotwang said: Hi all, I've been trying to make a class with which to manipulate sound data, and have run into some behaviour I don't understand which I hope somebody here can explain. The class has an attribute called data, which is a list with two elements, one

Re: List weirdness - what the heck is going on here?

2010-01-27 Thread Stephen Hansen
On Wed, Jan 27, 2010 at 6:06 PM, Rotwang wrote: > But suppose I replace the line > self.data = [[0]]*2 > > with > > self.data = [[0] for c in xrange(2)] > The first line does not do what you think it does: it doesn't make a copy of that internal [0]. Python almost never implicitly copies any

Re: myths about python 3

2010-01-27 Thread Neil Hodgson
Carl Banks: > There is also no hope someone will fork Python 2.x and continue it in > perpetuity. Well, someone might try to fork it, but they won't be > able to call it Python. Over time there may be more desire from those unable or unwilling to upgrade to 3.x to work on improvements to 2.x,

www.visualstudio.me

2010-01-27 Thread groups_ads12
www.visualstudio.me buy visual studio buy visual studio 2008 download microsoft visual studio 2005

Re: myths about python 3

2010-01-27 Thread Steve Holden
John Nagle wrote: > Daniel Fetchinson wrote: >> Hi folks, >> >> I was going to write this post for a while because all sorts of myths >> periodically come up on this list about python 3. I don't think the >> posters mean to spread false information on purpose, they simply are >> not aware of the fa

Re: Python Goldmine has been updated: http://preciseinfo.org/Convert/index_Convert_Python.html

2010-01-27 Thread tanix
In article , ta...@mongo.net (tanix) wrote: Good news: Site search has been fully implemented. You can search the entire Python collection or a single chapter related to specific context to find what you are looking for. Bad news: We are currently out of sync with google. So, if you do a goog

Re: Python and Ruby

2010-01-27 Thread rantingrick
On Jan 27, 5:31 pm, Jonathan Gardner wrote: > To add to that, Python is the type of language where experienced > programmers can pick it up by reading code, and newbies won't get > hopelessly lost. I've taught less-than-formal introductory programming > classes to people who are new to programmin

Re: myths about python 3

2010-01-27 Thread Paul Rubin
Steve Holden writes: > Kindly confine your debate to the facts and keep the snide remarks to > yourself. Like it or not Python 3 is the future, and unladen swallow's > recent announcement that they would target only Python 3 represented a > ground-breaking advance for the language. My take on thi

Re: List weirdness - what the heck is going on here?

2010-01-27 Thread alex23
Rotwang wrote: > Can anybody tell me what's going on? Your problem is basically this: >>> a = [1] >>> b = [a] * 2 >>> b [[1], [1]] >>> a.append(2) >>> b [[1, 2], [1, 2]] The expression '[a] * 2' doesn't make two copies of list of a list of a, it makes two nested _references_ to it. When you mod

Re: python 3's adoption

2010-01-27 Thread David Cournapeau
On Thu, Jan 28, 2010 at 9:25 AM, Paul Rubin wrote: > I don't mind that 3.x is breaking stuff for the sake of improving > things.  That's the whole idea of 3.x, after all.  What bugs me is that > the improvements are mostly quite superficial, and the breakage seems > often gratuitous.  I'd rather

Re: Stuck on a three word street name regex

2010-01-27 Thread Brian D
On Jan 27, 6:35 pm, Paul Rubin wrote: > Brian D writes: > > I've tackled this kind of problem before by looping through a patterns > > dictionary, but there must be a smarter approach.> > > Two addresses. Note that the first has incorrectly transposed the > > direction and street name. > > I

Re: Stuck on a three word street name regex

2010-01-27 Thread Brian D
On Jan 27, 7:27 pm, MRAB wrote: > Brian D wrote: > > I've tackled this kind of problem before by looping through a patterns > > dictionary, but there must be a smarter approach. > > > Two addresses. Note that the first has incorrectly transposed the > > direction and street name. The second has an

Re: python 3's adoption

2010-01-27 Thread Gib Bogle
Steven D'Aprano wrote: On Wed, 27 Jan 2010 02:28:00 +0100, Alf P. Steinbach wrote: * Print is now a function. Great, much improvement. Actually not, IMHO. All it does is is to provide incompatibility. They forgot Ronald Reagan's old maxim: if it don't need fixin', don't fix it. The aphor

Re: Python and Ruby

2010-01-27 Thread hackingKK
On Thursday 28 January 2010 08:11 AM, rantingrick wrote: On Jan 27, 5:31 pm, Jonathan Gardner wrote: To add to that, Python is the type of language where experienced programmers can pick it up by reading code, and newbies won't get hopelessly lost. I've taught less-than-formal introductory

Re: ISO module for binomial coefficients, etc.

2010-01-27 Thread Peter Pearson
On Sun, 24 Jan 2010 16:11:03 -0500, Dave Angel wrote: > I didn't think of simply summing the logs. A couple terms of Stirling's approximation work pretty well: def log_fact_half( N ): """log_fact_half( n ) returns the natural logarithm of the factorial of n/2. n need not be an integer. D

Re: ISO module for binomial coefficients, etc.

2010-01-27 Thread Daniel Stutzbach
On Sat, Jan 23, 2010 at 4:55 PM, kj wrote: > Before I go off to re-invent a thoroughly invented wheel, I thought > I'd ask around for some existing module for computing binomial > coefficient, hypergeometric coefficients, and other factorial-based > combinatorial indices. I'm looking for somethi

Re: Library support for Python 3.x

2010-01-27 Thread David Cournapeau
On Thu, Jan 28, 2010 at 7:38 AM, Terry Reedy wrote: > > For a windows user who depends on pre-built binaries, every new release > breaks *every* library that is not pure Python and needs to be compiled. That's not windows specific - most packages which distribute binary packages need to package

Re: myths about python 3

2010-01-27 Thread Terry Reedy
On 1/27/2010 8:36 PM, alex23 wrote: Terry Reedy wrote: Actually, Unladen Swallow is now targeted at 3.1; its developers have conservatively proposed its integration in CPython 3.3. This statement was to counter the 'myth' that US was only targeted at 2.x when the current situation is quite t

Python interface to Google translate?

2010-01-27 Thread python
Looking for any recommendations on a Python module/package that would allow me to submit small HTML Unicode documents to Google and retrieve the translated results. Or is this the type of task that one should use a urllib-like module and do manually? Note: By small HTML Unicode documents I mean fi

Re: Library support for Python 3.x

2010-01-27 Thread Paul Rubin
David Cournapeau writes: > That's not windows specific - most packages which distribute binary > packages need to package binaries for every minor version (2.4, 2.5, > etc...) > I doubt that's what Paul was referring to, though - he seemed more > concern with API/language changes than ABI issu

Re: List weirdness - what the heck is going on here?

2010-01-27 Thread Arnaud Delobelle
Rotwang writes: > Hi all, I've been trying to make a class with which to manipulate > sound data, and have run into some behaviour I don't understand which > I hope somebody here can explain. The class has an attribute called > data, which is a list with two elements, one for each audio channel,

Re: Library support for Python 3.x

2010-01-27 Thread David Cournapeau
On Thu, Jan 28, 2010 at 3:37 PM, Paul Rubin wrote: > David Cournapeau writes: >> That's not windows specific - most packages which distribute binary >> packages need to package binaries for every minor version (2.4, 2.5, >> etc...) >> I doubt that's what Paul was referring to, though - he see

Re: Ad hoc lists vs ad hoc tuples

2010-01-27 Thread Floris Bruynooghe
On Jan 27, 10:15 pm, Terry Reedy wrote: > On 1/27/2010 12:32 PM, Antoine Pitrou wrote: > > > Le Wed, 27 Jan 2010 02:20:53 -0800, Floris Bruynooghe a écrit : > > >> Is a list or tuple better or more efficient in these situations? > > > Tuples are faster to allocate (they are allocated in one single

Re: starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
Am Wednesday 27 January 2010 15:30:17 schrieb Stefan Behnel: > Richard Lamboj, 27.01.2010 15:23: > > Am Wednesday 27 January 2010 14:10:13 schrieb Stefan Behnel: > >> Richard Lamboj, 27.01.2010 14:06: > >>> just for _curiosity_. What would be if i start a thread in a nother > >>> thread and acquir

Re: python 3's adoption

2010-01-27 Thread Jonathan Gardner
On Jan 27, 4:25 pm, Paul Rubin wrote: > What about assert and pass? > If you're going to have statements, you're going to need the null statement. That's "pass". It could be renamed "null_statement" but "pass" is a better description. "None" and "pass" are cousins of sorts, since "None" is the n

<    1   2