Call for Proposals: PyCon AU 2014 in Brisbane

2014-03-10 Thread PyCon AU
PyCon Australia 2014 is pleased to announce that its Call for Proposals is now open! The conference this year will be held on Saturday 2 and Sunday 3 August 2014 in Brisbane. We'll also be featuring a day of miniconfs on Friday 1 August. The deadline for proposal submission is Friday April 25,

aspectlib 0.3.0

2014-03-10 Thread Ionel Cristian Maries
Hey everyone, I'm pleased to announce the first public release of `aspectlib`. It's on PyPI at https://pypi.python.org/pypi/aspectlib `aspectlib` is an aspect-oriented programming, monkey-patch and decorators library. It is useful when changing behavior of existing code is desired. I've

mimedecode.py version 2.4.0

2014-03-10 Thread Oleg Broytman
Hello! mimedecode.py WHAT IS IT Mail users, especially in non-English countries, often find that mail messages arrived in different formats, with different content types, in different encodings and charsets. Usually this is good because it allows us to use

[RELEASED] Python 3.3.5

2014-03-10 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm very happy to announce the release of Python 3.3.5. Python 3.3.5 includes fixes for these important issues: * a 3.3.4 regression in zipimport (see http://bugs.python.org/issue20621) * a 3.3.4 regression

[RELEASED] Python 3.4.0 release candidate 3

2014-03-10 Thread Larry Hastings
On behalf of the Python development team, I'm pleased to announce the third and final** release candidate of Python 3.4. This is a preview release, and its use is not recommended for production settings. Python 3.4 includes a range of improvements of the 3.x series, including hundreds of

Re: Balanced trees

2014-03-10 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Proof: I create a hash table that accepts unsigned bytes as keys, where The O(f(n)) notation has no meaning when n is limited. This thing is not just pedantry. The discussion was how a balanced tree fares in comparison with hash tables. A

Re: gdb unable to read python frame information

2014-03-10 Thread dieter
Wesley nisp...@gmail.com writes: So, let me clarify here, in order to try, I get a clean machine. Centos 6.5 64bit. Now , I try this: 1. install gdb 7.7 from source , with configure option --with-python 2. install python 2.6.6 from source, with configure option --with-pydebug 3. run a

Re: gdb unable to read python frame information

2014-03-10 Thread dieter
Mark Lawrence breamore...@yahoo.co.uk writes: On 10/03/2014 01:06, Wesley wrote: ... Context, you just keep sending messages like the above which on its own is meaningless. The original poster has send messages lacking important pieces of information -- but on request from the list, he has

Re: gdb unable to read python frame information

2014-03-10 Thread dieter
Wesley nisp...@gmail.com writes: If you don't read the loop from the top, and don't tell me exactly what you want by just keep saying context, please ingore this post. You are doing things only a few people do: trying to debug a Python process on C level -- and you observe really strange

[RELEASED] Python 3.4.0 release candidate 3

2014-03-10 Thread Larry Hastings
On behalf of the Python development team, I'm pleased to announce the third and final** release candidate of Python 3.4. This is a preview release, and its use is not recommended for production settings. Python 3.4 includes a range of improvements of the 3.x series, including hundreds of

Re: golang OO removal, benefits. over python?

2014-03-10 Thread Ian Kelly
On Sun, Mar 9, 2014 at 10:49 PM, flebber flebber.c...@gmail.com wrote: I was wondering if a better programmer than I could explain if the removal of OO features in golang really does offer an great benefit over python. An article I was reading ran through a brief overview of golang in respect

Re: Tuples and immutability

2014-03-10 Thread Ian Kelly
On Sun, Mar 9, 2014 at 8:37 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 09 Mar 2014 17:42:42 -0600, Ian Kelly wrote: On Sun, Mar 9, 2014 at 4:03 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Note that it says when possible, not if the implementation feels

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Tim Golden
On 10/03/2014 03:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't be the first time I've managed to screw something

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Tim Golden
On 10/03/2014 03:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't be the first time I've managed to screw something

Re: golang OO removal, benefits. over python?

2014-03-10 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: The description of how Go structs work is accurate from what I know of it, but I think the author goes astray in claiming that this is not OOP. Call it no-nonsense OOP. No wonder the color of the box was gray in the example. On the whole though I think that

Re: Balanced trees

2014-03-10 Thread Steven D'Aprano
On Mon, 10 Mar 2014 08:16:43 +0200, Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Proof: I create a hash table that accepts unsigned bytes as keys, where The O(f(n)) notation has no meaning when n is limited. It has obvious meaning: O(1) means that look-ups

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Jurko Gospodnetić
Hi. On 10.3.2014. 4:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't be the first time I've managed to screw

Re: Tuples and immutability

2014-03-10 Thread Steven D'Aprano
On Mon, 10 Mar 2014 02:35:36 -0600, Ian Kelly wrote: On Sun, Mar 9, 2014 at 8:37 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 09 Mar 2014 17:42:42 -0600, Ian Kelly wrote: On Sun, Mar 9, 2014 at 4:03 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Note that

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Mark Lawrence
On 10/03/2014 08:40, Tim Golden wrote: On 10/03/2014 03:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't be the first

Re: Balanced trees

2014-03-10 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: If I am right, that certainly would explain your apparent inability to understand the difference between is and == operators, your insistence that object IDs are addresses, and your declaration that object identity is philosophically

Re: Balanced trees

2014-03-10 Thread Mark Lawrence
On 10/03/2014 08:53, Steven D'Aprano wrote: In other words, I suspect you are trolling. s/suspect/know/ , he didn't make captain of my dream team for nothing, you know :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: Balanced trees

2014-03-10 Thread Ned Batchelder
On 3/10/14 5:41 AM, Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: If I am right, that certainly would explain your apparent inability to understand the difference between is and == operators, your insistence that object IDs are addresses, and your declaration that

Re: golang OO removal, benefits. over python?

2014-03-10 Thread flebber
Also, is there anything seriously lacking in Python, Java and C? Marko From their FAQ: Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose

ANN: psutil 2.0.0 released

2014-03-10 Thread Giampaolo Rodola'
Hi there folks, I'm pleased to announce the 2.0.0 release of psutil: http://code.google.com/p/psutil/ === About === psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Jurko Gospodnetić
Hi. On 10.3.2014. 4:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't be the first time I've managed to screw

Re: Windows installation problem with 3.3.5

2014-03-10 Thread Mark Lawrence
On 10/03/2014 12:51, Jurko Gospodnetić wrote: Hi. On 10.3.2014. 4:16, Mark Lawrence wrote: It looks as if the upgrade from 3.3.4 to 3.3.5 has stolen my copies of py.exe and pyw.exe from c:\windows. Before I raise an issue on the bug tracker could someone please confirm this, as it wouldn't

Re: image processing in python and opencv

2014-03-10 Thread Mark H. Harris
On Sunday, March 9, 2014 2:09:25 PM UTC-5, Gary Herron wrote: i have no idea how to retrieve indexed images stored in ordered dictionary, using its values like : blue,green,red mean along with contrast, energy, homogeneity and correlation. as i have calculated the euclidean distance and i

Re: Balanced trees

2014-03-10 Thread Roy Smith
In article 87eh2atw6s@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Proof: I create a hash table that accepts unsigned bytes as keys, where The O(f(n)) notation has no meaning when n is limited. This thing is not

Re: Can global variable be passed into Python function?

2014-03-10 Thread Albert van der Horst
In article 87sir2et1d@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Mark Lawrence breamore...@yahoo.co.uk: http://c2.com/cgi/wiki?SwitchStatementsSmell Your brief summary, please, Mark? Anyway, the first 1000 lines or so that I managed to read from that page stated a valid

[ANN] Oktest.py 0.14.0 released - a new-style testing library

2014-03-10 Thread Makoto Kuwata
I released Oktest.py 0.14.0. http://pypi.python.org/pypi/Oktest/ http://packages.python.org/Oktest/ Oktest.py is a new-style testing library for Python:: from oktest import ok, NG ok (x) 0 # same as assertTrue(x 0) ok (s) == 'foo'# same as assertEqual(s,

Re: Can global variable be passed into Python function?

2014-03-10 Thread Marko Rauhamaa
alb...@spenarnc.xs4all.nl (Albert van der Horst): I can't see why parsers decoders are any different. The Pentium assembler in my ciforth's ``forth.lab'' library has not a single if statement and I reckon it is a superior design. (State is kept in an ai blackboard fashion in bitmaps.) Forth

Salutations Python List!

2014-03-10 Thread Brian Murphy
http://lalimitada.com/templates/beez/bbcnews.php?awvq1600afttah Brian Murphy bam...@gmail.com Don't quit now, we might just as well lock the door and throw away the key. --

Re: Import order question

2014-03-10 Thread Albert van der Horst
In article le108a$oip$1...@dont-email.me, Rotwang sg...@hotmail.co.uk wrote: On 18/02/2014 23:41, Rick Johnson wrote: On Tuesday, February 18, 2014 5:28:21 PM UTC-6, Rotwang wrote: [snipped material restored for context] On 18/02/2014 21:44, Rick Johnson wrote: [...] Are you telling me

Re: debugging on windows

2014-03-10 Thread Robin Becker
. Unhandled exception at 0x1e0aebb8 in python.exe: 0xC005: Access violation reading location 0x0048. This is a C level error -- likely some memory corruption. You will need a C level debugger to analyse the problem - and likely, it will not be easy. indeed it was.

Re: golang OO removal, benefits. over python?

2014-03-10 Thread Chris Angelico
On Mon, Mar 10, 2014 at 6:50 PM, Ian Kelly ian.g.ke...@gmail.com wrote: The author points out that nested structures can be made optional by including a pointer to the structure instead of the structure itself. Again you can do the exact same thing in C++; in OOP this is usually described as a

Testing interactive code using raw_input

2014-03-10 Thread Steven D'Aprano
Does anyone have any good hints for testing interactive code that uses raw_input, or input in Python 3? A simple technique would be to factor out the interactive part, e.g. like this: # Before def spam(): answer = raw_input(prompt) return eggs(answer) + cheese(answer) + toast(answer)

Re: Balanced trees

2014-03-10 Thread Rustom Mody
On Monday, March 10, 2014 4:27:13 PM UTC+5:30, Ned Batchelder wrote: You are right that you and Steven have had a hard time communicating. You are part of you and Steven, it would be at least polite to consider that part of the reason for the difficulty has to do with your style. It can be

Re: Testing interactive code using raw_input

2014-03-10 Thread Oscar Benjamin
On 10 March 2014 15:59, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Does anyone have any good hints for testing interactive code that uses raw_input, or input in Python 3? A simple technique would be to factor out the interactive part, e.g. like this: # Before def spam():

Re: golang OO removal, benefits. over python?

2014-03-10 Thread wxjmfauth
Le lundi 10 mars 2014 05:49:20 UTC+1, flebber a écrit : Why would a Python user change to go except for new and interesting? Unicode jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: golang OO removal, benefits. over python?

2014-03-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Java's MI simply doesn't exist (that's perfectly pure!), although implementing interfaces can do a lot of it; but then you end up duplicating piles of code (on the other hand, that's nothing new in Java code). Java 8 has default methods for interfaces. That

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 12:59 AM, Roy Smith r...@panix.com wrote: The hash vs. tree argument can get very complicated. For example, if your tree is not completely resident in memory, the cost of paging in a node will swamp everything else, and improving lookup speed will boil down to reducing

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 12:59 AM, Roy Smith r...@panix.com wrote: Looking at the Songza source, I see we have one user-defined hash function: def __hash__(self): return hash((self.song, self.user, self.add_time,

Re: golang OO removal, benefits. over python?

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 3:16 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: Java's MI simply doesn't exist (that's perfectly pure!), although implementing interfaces can do a lot of it; but then you end up duplicating piles of code (on the other hand, that's

Re: Balanced trees

2014-03-10 Thread Tim Chase
On 2014-03-11 03:24, Chris Angelico wrote: Imagine, worst case, all one million records have the same song/user/add_time and you need to do twenty comparisons involving four fields. That's gotta be worse than one hashing of five fields. And if you have one million songs that are

Re:Testing interactive code using raw_input

2014-03-10 Thread Dave Angel
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info Wrote in message: Does anyone have any good hints for testing interactive code that uses raw_input, or input in Python 3? A simple technique would be to factor out the interactive part, e.g. like this: # Before def spam():

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 3:33 AM, Tim Chase python.l...@tim.thechases.com wrote: On 2014-03-11 03:24, Chris Angelico wrote: Imagine, worst case, all one million records have the same song/user/add_time and you need to do twenty comparisons involving four fields. That's gotta be worse than one

Re: Testing interactive code using raw_input

2014-03-10 Thread Peter Otten
Steven D'Aprano wrote: Does anyone have any good hints for testing interactive code that uses raw_input, or input in Python 3? A simple technique would be to factor out the interactive part, e.g. like this: # Before def spam(): answer = raw_input(prompt) return eggs(answer) +

Re: Balanced trees

2014-03-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: The only difference between a tree and a hash here is that the tree might be able to short-cut the comparisons. But if there are a whole bunch of songs with the same song and user, then the tree has to compare (song-song? same; user-user? same;

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 4:08 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: The only difference between a tree and a hash here is that the tree might be able to short-cut the comparisons. But if there are a whole bunch of songs with the same song and user, then

Closure/method definition question for Python 2.7

2014-03-10 Thread Brunick, Gerard:(Constellation)
The following code: --- class Test(object): x = 10 def __init__(self): self.y = x t = Test() --- raises NameError: global name 'x' is not defined. in Python 2.7. I don't understand why. I would assume that when __init__ is being defined, it is just a regular old function

Re: Balanced trees

2014-03-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Supposed to have? What does that mean, a language isn't ISO-compliant unless it provides both? It's an ancient, fundamental data structure, right up there with dynamic lists. There's no reason it shouldn't be available in every programming environment. With a

Re: Closure/method definition question for Python 2.7

2014-03-10 Thread Marko Rauhamaa
Brunick, Gerard:(Constellation) gerard.brun...@constellation.com: class Test(object): x = 10 def __init__(self): self.y = x t = Test() --- raises NameError: global name 'x' is not defined. In the snippet, x is neither local to __init__() nor global to the module. It

Re: Testing interactive code using raw_input

2014-03-10 Thread Ethan Furman
On 03/10/2014 08:59 AM, Steven D'Aprano wrote: With an automated test, I can provide the arguments, and check the result, but what are my options for *automatically* supplying input to raw_input? pexpect? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Closure/method definition question (delete 'for Python 2.7')

2014-03-10 Thread Terry Reedy
On 3/10/2014 1:27 PM, Brunick, Gerard:(Constellation) wrote: class Test(object): x = 10 def __init__(self): self.y = x t = Test() --- raises NameError: global name 'x' is not defined. in Python 2.7. In Python, period. I would assume that when __init__ is being

Re: Import order question

2014-03-10 Thread Rotwang
On 18/02/2014 23:28, Rotwang wrote: [...] I have music software that's a single 9K-line Python module, which I edit using Notepad++ or gedit. Incidentally, in the time since I wrote the above I've started using Sublime Text 3, following somebody on c.l.p's recommendation (I apologise that I

NEW EVIDENCE PROVES HUMAN DEVONIAN ORIGINS

2014-03-10 Thread THRINAXODDDDON
=== BREAKING NEWS! === NEW YORK TIMES, THRINAXODON, OHIO = THRINAXODON RECENTLY FOUND 3 HUMAN FOSSILS FROM DEVONIAN STRATA FROM GREENLAND, THE EVOLUTIONISTS HAVE NO BONES ABOUT. ONE EVIL EVOLUTIONIST, BOB CASANOVA HAS ADMITTED THAT HUMAN EVOLUTION

which async framework?

2014-03-10 Thread Chris Withers
Hi All, I see python now has a plethora of async frameworks and I need to try and pick one to use from: - asyncio/tulip - tornado - twisted From my side, I'm looking to experimentally build a network testing tool that will need to speak a fair few network protocols, both classic tcp and

when to use == and when to use is

2014-03-10 Thread George Trojan
I know this question has been answered: http://stackoverflow.com/questions/6570371/when-to-use-and-when-to-use-is , but I still have doubts. Consider the following code: class A: def __init__(self, a): self._a = a #def __eq__(self, other): #return self._a != other._a

Re: Loading a module from a subdirectory

2014-03-10 Thread Virgil Stokes
On 10-Mar-14 21:31, Virgil Stokes wrote: I have the following folder-file structure: C:/PythonCode/VideoPlayerSimulator/ +-- __init__.py (empty file) +-- GlbVars.py (contains the single class Glb)

Loading a module from a subdirectory

2014-03-10 Thread Virgil Stokes
I have the following folder-file structure: C:/PythonCode/VideoPlayerSimulator/ +-- __init__.py (empty file) +-- GlbVars.py (contains the single class Glb) C:/PythonCode/VideoPlayerSimulator/RubberBanding/

Re: when to use == and when to use is

2014-03-10 Thread Ned Batchelder
On 3/10/14 2:09 PM, George Trojan wrote: I know this question has been answered: http://stackoverflow.com/questions/6570371/when-to-use-and-when-to-use-is , but I still have doubts. Consider the following code: class A: def __init__(self, a): self._a = a #def __eq__(self,

Re: when to use == and when to use is

2014-03-10 Thread Ben Finney
George Trojan george.tro...@noaa.gov writes: Both if statements work, of course. Which is more efficient? I don't know. The answer is likely to be dependent on many details of the code and the data. But I do know that the different operators communicate different intents. And that should be a

Re: which async framework?

2014-03-10 Thread Terry Reedy
On 3/10/2014 4:38 PM, Chris Withers wrote: Hi All, I see python now has a plethora of async frameworks and I need to try and pick one to use from: - asyncio/tulip - tornado - twisted From my side, I'm looking to experimentally build a network testing tool that will need to speak a fair few

Re: Balanced trees

2014-03-10 Thread Roy Smith
In article 8761nmrnfk@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Anyway, this whole debate is rather unnecessary since every developer is supposed to have both weapons in their arsenal. The problem with having a choice is that it opens up the possibility of making the

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 10:24 AM, Roy Smith r...@panix.com wrote: As this discussion has shown, figuring out whether a hash table or a tree is better for a given problem is non-trivial. My guess is that if you gave 1000 typical developers both data structures and let them pick freely, the

Re: Loading a module from a subdirectory

2014-03-10 Thread Peter Otten
Virgil Stokes wrote: I have the following folder-file structure: C:/PythonCode/VideoPlayerSimulator/ +-- __init__.py (empty file) +-- GlbVars.py (contains the single class Glb)

Re: Testing interactive code using raw_input

2014-03-10 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Does anyone have any good hints for testing interactive code that uses raw_input, or input in Python 3? Are you testing the behaviour of the ‘input’ function? If not, then it is an external dependency; and, since you're not

Re: Closure/method definition question for Python 2.7

2014-03-10 Thread Ian Kelly
On Mon, Mar 10, 2014 at 11:27 AM, Brunick, Gerard:(Constellation) gerard.brun...@constellation.com wrote: The following code: --- class Test(object): x = 10 def __init__(self): self.y = x t = Test() --- raises NameError: global name 'x' is not defined. in Python

Re: when to use == and when to use is

2014-03-10 Thread Skip Montanaro
I agree with Ben. In this particular case, it seems you really should be using == unless obj_0, obj_1, and obj_2 are sentinels. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Balanced trees

2014-03-10 Thread Dan Stromberg
On Mon, Mar 10, 2014 at 6:59 AM, Roy Smith r...@panix.com wrote: On the other hand, log n, for n = 1 million, is just 20. It's not hard to imagine a hash function which costs 20x what a node traversal does, in which case, the log n lookup is ahead for all n 1 million. FWIW, both the hash

Re: Balanced trees

2014-03-10 Thread Steven D'Aprano
On Mon, 10 Mar 2014 19:24:07 -0400, Roy Smith wrote: In article 8761nmrnfk@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Anyway, this whole debate is rather unnecessary since every developer is supposed to have both weapons in their arsenal. The problem with having a

Re: gdb unable to read python frame information

2014-03-10 Thread Wesley
[root@localhost ~]# gdb python GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 12:26 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: In my experience, the average developer has an amazing talent for pessimising code when they think they are optimising it. I remember a number of incidents from personal experience when I was a *very*

Re: Balanced trees

2014-03-10 Thread Steven D'Aprano
On Mon, 10 Mar 2014 09:01:23 -0700, Rustom Mody wrote: 2. Being pointed out that a finite-input table-lookup being called a hash-function is a rather nonsensical claim and goes counter to the basic tenets of asymptotic notation. (In CS unlike in math 'asymptote' is always infinity) IOW

Re: Balanced trees

2014-03-10 Thread Roy Smith
In article mailman.8031.1394499924.18130.python-l...@python.org, Dan Stromberg drsali...@gmail.com wrote: On Mon, Mar 10, 2014 at 6:59 AM, Roy Smith r...@panix.com wrote: On the other hand, log n, for n = 1 million, is just 20. It's not hard to imagine a hash function which costs 20x what

Re: Balanced trees

2014-03-10 Thread Roy Smith
In article 531e6eca$0$29994$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: There's only so much matter in the universe, so talking about limits as the amount of data approaches infinity is nonsense. Where would you store it? Funny you should

Re: gdb unable to read python frame information

2014-03-10 Thread Wesley
Now, I fixed the problem... Instead of python2.6.6, for python 2.7 it's OK.. Why? gdb does not support python 2.6.6? Is it related to python-gdb.py? I googled a lot, seems only has python2.7-gdb.py, no python2.6-gdb.py. 在 2014年3月10日星期一UTC+8下午3时28分30秒,dieter写道: Wesley nisp...@gmail.com

Re: Balanced trees

2014-03-10 Thread Ian Kelly
On Mon, Mar 10, 2014 at 7:45 PM, Chris Angelico ros...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:26 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: In my experience, the average developer has an amazing talent for pessimising code when they think they are optimising it. I

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 2:38 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Mar 10, 2014 at 7:45 PM, Chris Angelico ros...@gmail.com wrote: No no, I could make this so much better by using the 80x86 REP MOVSW command (or commands, depending on your point of view). That would be so much

Re: Tuples and immutability

2014-03-10 Thread Gregory Ewing
Ian Kelly wrote: It's technically possible for this augmented assignment to be performed in place: x = 12 x += 4 But it's not done in-place, because ints are meant to be immutable. Which means it's *not* possible, because doing so would violate the documented properties of the int type. In

Re: Tuples and immutability

2014-03-10 Thread Gregory Ewing
Ian Kelly wrote: If the in-place behavior of += is held to be part of the interface, then we must accept that += is not polymorphic across mutable and immutable types, That's quite correct, it's not. As I said, it's one notation doing double duty. Usually there isn't any confusion, because

querry on queue ( thread safe ) multithreading

2014-03-10 Thread Jaiprakash Singh
hey i am working on scraping a site , so i am using multi-threading concept. i wrote a code based on queue (thread safe) but still my code block out after sometime, please help , i have searched a lot but unable to resolve it. please help i stuck here. my code is under ..

Re: Struggling to create an extension wrapping a 3rd party dll

2014-03-10 Thread Christoff Kok
On Wednesday, 5 March 2014 09:10:33 UTC+2, Christoff Kok wrote: Hi, We are trying to wrap a 3rd party dll (written in C) to access it through python. The dll has a .lib .c and a .h file with it. We are accessing the dll through the .c file. Outisde of the extension (running

Re: Balanced trees

2014-03-10 Thread Chris Angelico
On Tue, Mar 11, 2014 at 1:20 PM, Roy Smith r...@panix.com wrote: In article 531e6eca$0$29994$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: There's only so much matter in the universe, so talking about limits as the amount of data approaches

[issue20090] slight ambiguity in README.txt instructions for building docs

2014-03-10 Thread Tracy Chang
Tracy Chang added the comment: Is this issue only to update the doc or need to update the Error message as well? For error message, is it part of Sphinx? -- nosy: +tracy.chang ___ Python tracker rep...@bugs.python.org

[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2014-03-10 Thread STINNER Victor
STINNER Victor added the comment: I don't understand why /etc/services would miss. What is the current behaviour? What is the error message? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20868

[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2014-03-10 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20868 ___ ___ Python-bugs-list

[issue20878] Windows: uninstall Python 3.4rc3 after downgrade pip leaves files in c:\python34

2014-03-10 Thread STINNER Victor
New submission from STINNER Victor: I installed Python 3.4rc3 on Windows 7, I downgraded pip (from 1.5.3) to 1.5.3 and then I uninstalled Python 3.4rc3. Some files of pip and setuptools remaing in C:\Python34, is it expected? C:\Python34\Scripts: easy_install-3.4.exe easy_install.exe pip.exe

[issue20878] Windows: uninstall Python 3.4rc3 after downgrade pip leaves files in c:\python34

2014-03-10 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Windows versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20878 ___

[issue19281] add __objclass__ to the docs

2014-03-10 Thread priya
Changes by priya priyapappachan...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file34324/__objclass__.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19281 ___

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread STINNER Victor
New submission from STINNER Victor: According to tracemalloc, import base64 allocates 920.6 kB of memory. The 3 top locations are: Lib/base64.py:414: size=420 KiB, count=7226, average=59 B _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars] Lib/base64.py:306: size=420 KiB,

[issue20880] Windows installation problem with 3.3.5

2014-03-10 Thread Mark Lawrence
New submission from Mark Lawrence: The upgrade from 3.3.4 to 3.3.5 has removed py[w].exe from c:\windows. Tim Golden has given a possible explanation here https://mail.python.org/pipermail/python-list/2014-March/668674.html. -- components: Installation, Windows messages: 213019 nosy:

[issue20880] Windows installation problem with 3.3.5

2014-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think Tim's theory is true, but I can't suggest a better explanation. This would need to be debugged, by running msiexec /i name-of-installer.msi /l*v python.log and submitting the resulting python.log here. -- nosy: +loewis

[issue20878] Windows: uninstall Python 3.4rc3 after downgrade pip leaves files in c:\python34

2014-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is indeed expected, and applies to any other packages you have installed from PyPI as well (and also to any files that you manually created in the installation directory). Python only removes what it installed itself. -- resolution: - invalid

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2014-03-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: Documentation update attached. -- Added file: http://bugs.python.org/file34326/pdb_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16596 ___

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's a classical time-space trade-off. I'm not sure this is a bug; if it is, the reasonable change (IMO) is to just revert the introduction of these *2 tables, and loop through the output character-by-character. I'd personally be in favor of such a change

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm also -0 on delayed creation of the tables. If these encodings are used, the memory overhead will still occur. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread STINNER Victor
STINNER Victor added the comment: I'd personally be in favor of such a change (drop the tables). I didn't propose to drop the table, but create a table the first time that it is needed. I never used ascii85 nor base85 nor base32 in my applications. Maybe because ascii85 and base85 are new

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___

[issue20879] base64 module of Python 3.4 uses 920 kB of memory

2014-03-10 Thread STINNER Victor
STINNER Victor added the comment: base64_on_demand.patch: create tables the first time they are needed. b85decode() already uses such trick to build _b85dec. Note: a85decode() doesn't use a precomputed table. If people think that these functions are too slow, they should propose an

  1   2   3   >