ANN: dnslib-0.9.0 - DNS library for Python (with Py2/3 support)

2014-05-08 Thread Paul Chakravarti
Hello, I have just uploaded a new version of 'dnslib' to PyPi: https://pypi.python.org/pypi/dnslib/0.9.0 'dnslib' is a simple but very flexible library for encoding decoding DNS data and creating custom DNS resolvers for Python 2/3. This is the first version that supports Python 3.2+

[RELEASED] Python 3.4.1rc1

2014-05-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm pleased to announce the availability of Python 3.4.1rc1. Python 3.4.1rc1 has over three hundred bugfixes and other improvements over 3.4.0. One notable change: the version of OpenSSL bundled with the Windows

Nose 1.3.3 Released

2014-05-08 Thread John Szakmeister
Nose 1.3.3 fixes a simple issue with the reported version number. Sorry for the back-to-back releases. Enjoy! -John -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Jython 2.7b2 released!

2014-05-08 Thread fwierzbi...@gmail.com
On behalf of the Jython development team, I'm pleased to announce that the second beta of Jython 2.7 is available. Details are here: http://fwierzbicki.blogspot.com/2014/05/jython-27-beta2-released.html Thanks to Adconion Media Group for sponsoring my work on Jython, and thanks to the many

StoryText 3.11 - GUI testing tool

2014-05-08 Thread Geoff Bache
Hi all, The 3.11 release features the following: - PyGTK part now supports FileChooser synchronisation in GTK+ = 2.20 - Java GUI parts (SWT/Eclipse/Swing) can now disable Jython cache (recommended) - Eclipse RCP part now handles the latest Jython version (2.5.3) - Eclipse RCP part now supports

Re: Unicode in Python

2014-05-08 Thread wxjmfauth
Le jeudi 1 mai 2014 19:21:14 UTC+2, rand...@fastmail.us a écrit : On Mon, Apr 28, 2014, at 4:57, wxjmfa...@gmail.com wrote: Python 3: - It missed the unicode shift. - Covering the whole unicode range will not make Python a unicode compliant product. Please cite exactly what

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ben Finney b...@benfinney.id.au: Many established and still-popular languages have the following behaviour:: # pseudocode foo = [1, 2, 3] bar = foo # bar gets the value [1, 2, 3] assert foo == bar # succeeds foo[1] = spam# foo is now == [1, spam, 3]

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Marko Rauhamaa ma...@pacujo.net writes: What you are describing is that Python has pointer semantics. That doesn't describe it, no. To my eye, “pointer semantics” entails that one can directly pass a pointer around as a value (which can't be done for Python references), and that one can

Re: The does Python have variables? debate

2014-05-08 Thread Rustom Mody
On Thursday, May 8, 2014 12:10:45 PM UTC+5:30, Ben Finney wrote: Marko Rauhamaa writes: What you are describing is that Python has pointer semantics. That doesn't describe it, no. To my eye, pointer semantics entails that one can directly pass a pointer around as a value (which can't be

Re: The does Python have variables? debate

2014-05-08 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: I get the impression that you dont get the difference (I think Marko is making) between - language has pointers - language has pointer semantics Yes. Like Python, Java doesn't have pointers. However, when you try to dereference null, a NullPointerException

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Antoon Pardon
On 07-05-14 16:32, Grant Edwards wrote: So I'm not sure that what you want to do is the polite thing to do. Why not? Nevermind, I originally hadn't thought things completly through. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Johannes Schneider
On 08.05.2014 02:35, Ben Finney wrote: Marko Rauhamaa ma...@pacujo.net writes: [..] Python, on the other hand, has this behaviour:: foo = [1, 2, 3] bar = foo # ‘bar’ binds to the value ‘[1, 2, 3]’ assert foo == bar # succeeds foo[1] = spam# ‘foo’ *and* ‘bar’

Re: The “does Python have variables?” debate

2014-05-08 Thread Joseph Martinot-Lagarde
Le 08/05/2014 02:35, Ben Finney a écrit : Marko Rauhamaa ma...@pacujo.net writes: Ben Finney b...@benfinney.id.au: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For me, names bound to values is the same concept as pointer pointing to memory. bar = foo copies the pointer and not the underlying memory. This is not a foreign concept to C programmers. That is

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Ned Batchelder n...@nedbatchelder.com writes: I thought we were concerned with beginners incorrectly thinking Python worked like C, but this [pseudocode] is nothing like C. I'm not concerned about where these misconceptions come from, whether C or any other language. The concern is that the

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ben Finney b...@benfinney.id.au: The concern is that the term “variable”'s existing baggage in the programming community encourages *false inferences* that a beginner doesn't even realise they're drawing. By discouraging use of that term and replacing it with “name binding” or “reference”, a

Saving a file as netCDF4 in Python

2014-05-08 Thread Jamie Mitchell
Dear all, Apologies as this sounds like a very simple question but I can't find an answer anywhere. I have loaded a netCDF4 file into python as follows: swh=netCDF4.Dataset('path/to/netCDFfile,'r') I then isolate the variables I wish to plot: hs=swh.variables['hs']

Re: data: protocol

2014-05-08 Thread Robin Becker
On 08/05/2014 04:46, Steven D'Aprano wrote: On Wed, 07 May 2014 11:42:24 +0100, Robin Becker wrote: I have an outstanding request for ReportLab to allow images to be opened using the data: scheme. That used to be supported in python 2.7 using urllib, but in python 3.3 urllib2 -- urllib and at

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Marko Rauhamaa ma...@pacujo.net writes: I don't think flogging the beginner for talking about variables helps them get Python's data model. All that accomplishes is that they will shut up about variables in the fear of being flogged and not understand the data model any better. Who does

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ben Finney b...@benfinney.id.au: Marko Rauhamaa ma...@pacujo.net writes: I don't think flogging the beginner for talking about variables helps them get Python's data model. All that accomplishes is that they will shut up about variables in the fear of being flogged and not understand the

Re: The “does Python have variables?” debate

2014-05-08 Thread Roy Smith
In article mailman.9742.1399477705.18130.python-l...@python.org, Jerry Hill malaclyp...@gmail.com wrote: thinking of python variables as having two parts -- names and values -- really can help people who are struggling to learn the language. There's many levels of learning, and we see them

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Thu, May 8, 2014 at 10:41 PM, Roy Smith r...@panix.com wrote: At some point, that model no longer fits reality well enough that it becomes a barrier to further learning. When I write: def mutate(x, y): x = 42 y[0] = 42 x = 4 y = [4] mutate(x, y) print x, y and run it,

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 12:43:29 +0300, Marko Rauhamaa wrote: Ben Finney b...@benfinney.id.au: The concern is that the term “variable”'s existing baggage in the programming community encourages *false inferences* that a beginner doesn't even realise they're drawing. By discouraging use of that

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 18:14:48 +1000, Chris Angelico wrote: On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For me, names bound to values is the same concept as pointer pointing to memory. bar = foo copies the pointer and not the underlying memory.

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Grant Edwards
On 2014-05-07, Ian Kelly ian.g.ke...@gmail.com wrote: On May 7, 2014 9:13 AM, Chris Angelico ros...@gmail.com wrote: On Thu, May 8, 2014 at 1:06 AM, Burak Arslan burak.ars...@arskom.com.tr wrote: Seeing how discussion is still going on about this, I'd like to state once more what I said

Re: Using ssl.wrap_socket() in chroot jail

2014-05-08 Thread Grant Edwards
On 2014-05-08, Chris Angelico ros...@gmail.com wrote: On Thu, May 8, 2014 at 4:51 AM, Grant Edwards invalid@invalid.invalid wrote: Unfortunately, the actual SSL wrapping stuff isn't being done in my code. It's being done by the secure-smtpd module, which will pass whatever cert/key params I

Re: The “does Python have variables?” debate

2014-05-08 Thread Ethan Furman
On 05/08/2014 05:41 AM, Roy Smith wrote: In article mailman.9742.1399477705.18130.python-l...@python.org, Jerry Hill malaclyp...@gmail.com wrote: thinking of python variables as having two parts -- names and values -- really can help people who are struggling to learn the language. There's

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Chris Angelico
On Thu, May 8, 2014 at 11:28 PM, Grant Edwards invalid@invalid.invalid wrote: I also don't remember off the top of my head what you're supposed to do with headers that get too long (I think you just stick in a \r\n followed by some whitespace and then continue the header, but I'd have to look

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Thu, May 8, 2014 at 11:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: So... although I don't go quite so far as Ben in thinking that using the term variable in describing Python is harmful, I will say that the no variables meme is *useful* precisely because it is so

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ethan Furman et...@stoneleaf.us: On 05/08/2014 05:41 AM, Roy Smith wrote: For those people, talking about variables as a container to hold a value is the right level of abstraction. [...] Teaching someone that Python variables are containers is a massive fail. But that's what they are.

Re: The “does Python have variables?” debate

2014-05-08 Thread Michael Torrie
On 05/08/2014 07:18 AM, Steven D'Aprano wrote: Nobody has suggested flogging anyone, not even figuratively. Unless you believe that correcting a misapprehension, no matter how gently it is done, is a flogging, I don't see how you draw the conclusion that Ben is talking about flogging

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 12:06 AM, Michael Torrie torr...@gmail.com wrote: Agreed, although this entire thread of conversation kind of illustrates a kind of debating of issues that happen regularly on this mailing list and probably does turn off a lot of newbies, and probably turned off the

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 23:46:31 +1000, Chris Angelico wrote: On Thu, May 8, 2014 at 11:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: So... although I don't go quite so far as Ben in thinking that using the term variable in describing Python is harmful, I will say that the

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Ethan Furman
On 05/08/2014 06:28 AM, Grant Edwards wrote: Yow! All this time I've at been VIEWING a RUSSIAN MIDGET SODOMIZE a HOUSECAT! Some filtering of your sigs would be appreciated. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Neil D. Cerutti
On 5/8/2014 8:41 AM, Roy Smith wrote: In article mailman.9742.1399477705.18130.python-l...@python.org, Jerry Hill malaclyp...@gmail.com wrote: thinking of python variables as having two parts -- names and values -- really can help people who are struggling to learn the language. There's

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Skip Montanaro
On Thu, May 8, 2014 at 8:46 AM, Ethan Furman et...@stoneleaf.us wrote: Some filtering of your sigs would be appreciated. Looks like a Zippy the Pinhead quote to me... http://rosinstrument.com/cgi-bin/fortune.pl/21?97 Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 12:22 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Maybe the shock value is helpful, but that doesn't mean the statement's strictly correct. It seems that every time we have one of these discussions, someone claims that Python's name-object bindings are

Re: data: protocol

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 4:34 AM, Robin Becker ro...@reportlab.com wrote: Since urllib doesn't always work as expected in 3.3 I've had to write a small stub for the special data: case. Doing all the splitting off of the headers seems harder than just doing the special case. However, there are a

Re: Python under the sea and in space

2014-05-08 Thread sjmsoft
On Wednesday, May 7, 2014 9:34:14 PM UTC-3, Steven D'Aprano wrote: I'm afraid I don't know what eight miles high in the figurative sense means. I was referring to the Byrd's song Eight Miles High--purportedly a drug song. -- SJM -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Fri, 09 May 2014 00:51:01 +1000, Chris Angelico wrote: which is patently false, as a number of other languages do the same thing (often calling them variables). So what does Python doesn't have variables mean? Really it's Python doesn't have variables like C's or Pascal's. Which is what

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 2:04 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Personally, I think that trying to be general and talk about many other languages is a failing strategy. Better to be concrete: C, Pascal, Algol, Fortran, VB (I think) are good examples of the value in a

Re: data: protocol

2014-05-08 Thread Robin Becker
On 08/05/2014 16:07, Ian Kelly wrote: The DataHandler class in 3.4 is all of 14 lines of code. My first which makes me wonder why the old URLopener is still there and why all this wasn't done before 3.0 appeared. instinct would be to backport that and add it to some OpenerDirector

Re: Python under the sea and in space

2014-05-08 Thread mm0fmf
On 07/05/2014 03:31, Jessica McKellar wrote: Hi folks, I'm trying to determine the greatest depth (in the ocean or underground) and highest altitude at which Python code has been executed. [snip] Do you have some good candidates? Please let me know! I have executed Python code (bottle web

Re: Python under the sea and in space

2014-05-08 Thread Larry Martell
On Tue, May 6, 2014 at 8:31 PM, Jessica McKellar jessica.mckel...@gmail.com wrote: Hi folks, I'm trying to determine the greatest depth (in the ocean or underground) and highest altitude at which Python code has been executed. I have written avionics data collection apps there were used in

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Grant Edwards
On 2014-05-08, Skip Montanaro s...@pobox.com wrote: On Thu, May 8, 2014 at 8:46 AM, Ethan Furman et...@stoneleaf.us wrote: Some filtering of your sigs would be appreciated. Looks like a Zippy the Pinhead quote to me... http://rosinstrument.com/cgi-bin/fortune.pl/21?97 Yep. I've removed a

Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
I have a problem that would benefit from a multithreaded implementation and having trouble understanding how to approach it using concurrent.futures. The details don't really matter, but it will probably help to be explicit. I have a large CSV file that contains a lot of fields, amongst them one

Re: Real-world use of concurrent.futures

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 4:55 AM, Andrew McLean li...@andros.org.uk wrote: Because of latency in the DNS lookup this could benefit from multithreading. Before you go too far down roads that are starting to look problematic: A DNS lookup is a UDP packet out and a UDP packet in (ignoring the

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Marko Rauhamaa ma...@pacujo.net writes: Ben Finney b...@benfinney.id.au: Who does that? I haven't seen anyone raising this topic with a beginner in a hostile manner (“flogging”? why the hyperbole?), and it's certainly not characteristic of how the topic is raised here. Flogging,

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Tim Chase
On 2014-05-08 18:39, Grant Edwards wrote: Looks like a Zippy the Pinhead quote to me... Yep. I'm kinda disappointed having the curtain pulled back like that. I'd just assumed it was some nifty tool that turned a GPG/PGP signature into MadLibs™-style fill-in-the-blank and then flowed into

Re: The “does Python have variables?” debate

2014-05-08 Thread Terry Reedy
On 5/8/2014 4:14 AM, Chris Angelico wrote: On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For me, names bound to values is the same concept as pointer pointing to memory. You are missing a level of indirection. In CPython, a name (always in

Re: Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
On 08/05/2014 20:06, Chris Angelico wrote: On Fri, May 9, 2014 at 4:55 AM, Andrew McLean li...@andros.org.uk wrote: Because of latency in the DNS lookup this could benefit from multithreading. Before you go too far down roads that are starting to look problematic: A DNS lookup is a UDP packet

Re: Real-world use of concurrent.futures

2014-05-08 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Before you go too far down roads that are starting to look problematic: A DNS lookup is a UDP packet out and a UDP packet in (ignoring the possibility of TCP queries, which you probably won't be doing here). Maybe it would be easier to implement it as

Re: Real-world use of concurrent.futures

2014-05-08 Thread Marko Rauhamaa
Andrew McLean li...@andros.org.uk: That's fine, but I suspect that isn't a helpful pattern if I have a very large number of tasks. In my case I could run out of memory if I tried submitting all of the tasks to the executor before processing any of the results. This is related to flow

Re: Significant digits in a float?

2014-05-08 Thread Adam Funk
On 2014-05-02, Dennis Lee Bieber wrote: On Thu, 01 May 2014 21:55:20 +0100, Adam Funk a24...@ducksburg.com declaimed the following: On 2014-05-01, Dennis Lee Bieber wrote: Math teacher was selling them in my 10th grade... Actually I already owned a Faber-Castell 57/22 Business ruler

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Terry Reedy tjre...@udel.edu: On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For me, names bound to values is the same concept as pointer pointing to memory. You are missing a level of indirection. In CPython, a name (always in some

Re: Real-world use of concurrent.futures

2014-05-08 Thread Terry Reedy
On 5/8/2014 2:55 PM, Andrew McLean wrote: I have a problem that would benefit from a multithreaded implementation and having trouble understanding how to approach it using concurrent.futures. The details don't really matter, but it will probably help to be explicit. I have a large CSV file that

Re: Real-world use of concurrent.futures

2014-05-08 Thread Ian Kelly
On May 8, 2014 12:57 PM, Andrew McLean li...@andros.org.uk wrote: So far so good. However, I thought this would be an opportunity to explore concurrent.futures and to see whether it offered any benefits over the more explicit approach discussed above. The problem I am having is that all the

Re: Real-world use of concurrent.futures

2014-05-08 Thread Andrew McLean
On 08/05/2014 21:44, Ian Kelly wrote: I don't think it needs to be messy. Something like this should do the trick, I think: from concurrent.futures import * from itertools import islice def batched_pool_runner(f, iterable, pool, batch_size): it = iter(iterable) # Submit the first

Re: The “does Python have variables?” debate

2014-05-08 Thread Ethan Furman
On 05/08/2014 12:14 PM, Ben Finney wrote: Marko Rauhamaa writes: Point being, shunning the term variable is counterproductive. Python variables are nothing special and calling them variables doesn't mislead anybody. Okay, that's your point. You haven't backed it up, so I'll ignore it for

how to create an external string when binding C to Python?

2014-05-08 Thread Simon
I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2]. Creates a new external string

how to create a zero copy external string when binding C to Python?

2014-05-08 Thread Simon
I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2]. Creates a new external string

Re: The “does Python have variables?” debate

2014-05-08 Thread Ethan Furman
On 05/08/2014 01:06 PM, Marko Rauhamaa wrote: Terry Reedy tjre...@udel.edu: On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For me, names bound to values is the same concept as pointer pointing to memory. You are missing a level of indirection.

Re: The “does Python have variables?” debate

2014-05-08 Thread Ethan Furman
On 05/08/2014 07:03 AM, Marko Rauhamaa wrote: Ethan Furman et...@stoneleaf.us: On 05/08/2014 05:41 AM, Roy Smith wrote: For those people, talking about variables as a container to hold a value is the right level of abstraction. Teaching someone that Python variables are containers is a

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Mark Lawrence
On 09/05/2014 00:10, Simon wrote: I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal()

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 14:50:08 -0700, Ethan Furman wrote: I guess my point is, calling aliases variables wasn't the misleading part, it was my lack of knowledge that there was more than one kind of variable possible. Such ignorance is only solved by learning different languages, The *only*

Re: The “does Python have variables?” debate

2014-05-08 Thread Ethan Furman
Back when I was trying to learn the differences between Python's name-binding and C-like variables, a couple folks stepped up and provided great assistance. This first email, while delving into details that are not accessible in Python, still helped a great deal:

Re: The “does Python have variables?” debate

2014-05-08 Thread Mark Lawrence
On 09/05/2014 01:05, Ethan Furman wrote: Back when I was trying to learn the differences between Python's name-binding and C-like variables, a couple folks stepped up and provided great assistance. This first email, while delving into details that are not accessible in Python, still helped a

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 09:26:57 +0200, Johannes Schneider wrote: On 08.05.2014 02:35, Ben Finney wrote: Marko Rauhamaa ma...@pacujo.net writes: [..] Python, on the other hand, has this behaviour:: foo = [1, 2, 3] bar = foo # ‘bar’ binds to the value ‘[1, 2, 3]’ assert

Re: Real-world use of concurrent.futures

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 5:45 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: Before you go too far down roads that are starting to look problematic: A DNS lookup is a UDP packet out and a UDP packet in (ignoring the possibility of TCP queries, which you probably

Re: The � debate

2014-05-08 Thread Gregory Ewing
Steven D'Aprano wrote: Today we routinely call horseless carriages cars, and nobody would blink if I pointed at a Prius or a Ford Explorer and said that's not a carriage, it's a car except to wonder why on earth I thought something so obvious needed to be said. That's only because the term

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 5:10 PM, Simon simo...@gmail.com wrote: I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 21:02:36 -0400, Dennis Lee Bieber wrote: On 08 May 2014 16:04:51 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info declaimed the following: Personally, I think that trying to be general and talk about many other languages is a failing strategy. Better to be

Re: Add Received: header to email msg in correct position?

2014-05-08 Thread Ethan Furman
On 05/08/2014 11:39 AM, Grant Edwards wrote: Yep. I've removed a few of them from the file over the years because some people were offended by them. And I'll continue to do so... Thanks, much appreciated. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Roy Smith
In article 536c3049$0$29965$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Although Fortran is still in use, and widely so, it is mostly used for accessing existing Fortran libraries rather than writing new applications. There may be niches

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 12:21 PM, Roy Smith r...@panix.com wrote: In article 536c3049$0$29965$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Although Fortran is still in use, and widely so, it is mostly used for accessing existing Fortran

Re: The � debate

2014-05-08 Thread Ben Finney
Gregory Ewing greg.ew...@canterbury.ac.nz writes: If you look at the way the word variable is used across a variety of language communities, the common meaning is more or less something that can appear on the left hand side of an assignment statement. The clear experience from years in this

trailing underscores naming convention_

2014-05-08 Thread Metallicow
I seem to be comfortable with all the information out around the net dealing with python naming conventions. Occasionally I have to remind myself on some of this stuff. The PEP8 does a good job for most of it, but I am having a bit of trouble finding some more detailed information on the trailing

Re: trailing underscores naming convention_

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 9:28 PM, Metallicow metaliobovi...@gmail.com wrote: I seem to be comfortable with all the information out around the net dealing with python naming conventions. Occasionally I have to remind myself on some of this stuff. The PEP8 does a good job for most of it, but I am

Re: trailing underscores naming convention_

2014-05-08 Thread Metallicow
On Thursday, May 8, 2014 10:24:00 PM UTC-6, Ian wrote: On Thu, May 8, 2014 at 9:28 PM, Metallicow wrote: I seem to be comfortable with all the information out around the net dealing with python naming conventions. Occasionally I have to remind myself on some of this stuff. The PEP8 does a

Re: The does Python have variables? debate

2014-05-08 Thread Rustom Mody
On Friday, May 9, 2014 8:01:56 AM UTC+5:30, Chris Angelico wrote: On Fri, May 9, 2014 at 12:21 PM, Roy Smith wrote: Steven D'Aprano wrote: Although Fortran is still in use, and widely so, it is mostly used for accessing existing Fortran libraries rather than writing new

Re: trailing underscores naming convention_

2014-05-08 Thread Metallicow
I guess to be more clear here is a small code snippet that shows what is happening more readably. Hence the underscores question. class MainAuiManager(aui.AuiManager): def __init__(self, managed_window=None, agwFlags=0) aui.AuiManager.__init__(self, managed_window, agwFlags)

Re: The does Python have variables? debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 3:40 PM, Rustom Mody rustompm...@gmail.com wrote: I'd like to argue that you're not using Fortran, then. You're making use of it in the same way that I might make use of Ruby, PHP, and Perl when I browse the web Yes one can argue so But one can also argue that this is

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden
Tim Golden added the comment: +1 for Kristjan's latest patch. And thanks for working this through, Kristjan: I'd missed the fact that the microseconds conversion could itself overflow even an unsigned long. -- ___ Python tracker

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Mateusz Loskot
New submission from Mateusz Loskot: While building Python 3.2 or Python 3.4 with Visual Studio 2013 on Windows 8.1, pythoncore.vcxproj fails to build due to illformed pre-link event command. (FYI, I have upgraded all .vcxproj files to VS2013 locally.) Here is the command and the error: pre

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Thanks. Can you confirm that it resolves the issue? I'll get it checked in once I get the regrtest suite run. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden
Tim Golden added the comment: s/Py_LONG_LONG/PY_LONG_LONG/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I see, I wasn't able to compile it yesterday when I did it :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___

[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-08 Thread Francisco Gracia
Francisco Gracia added the comment: I had problems for installing your *SearchBar*, Tal, in Python 33 and 34 until it downed onto me that in its present form it is only Python 2 compliant. This is then its first weakness, that of course can be easily remedied by applying *2to3.py* to it, as I

[issue12916] Add inspect.splitdoc

2014-05-08 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi all, No news about this issue, Do you have time for a feedback? Thanks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12916 ___

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Tim Golden
Tim Golden added the comment: What effect does your patch have on a VS2010 build? VS2010 is the official toolset for current Python 3.x versions so any changes we make must support that. Also: does the same problem occur on the development branch? (De-selecting 3.2 as it's in security-fix

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden
Tim Golden added the comment: I can confirm that the attached test.py times out after 2150 seconds (ie 30+ minutes) with your (tweaked) patch applied: python test.py 2150 Running Debug|Win32 interpreter... 2014-05-08 10:33:53.670091 Expected to time out by 2014-05-08 11:09:43.670091 Timed Out

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: nope, let's not do that :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 80b76c6fad44 by Kristján Valur Jónsson in branch 'default': The PyCOND_TIMEDWAIT must use microseconds for the timeout argument http://hg.python.org/cpython/rev/80b76c6fad44 -- nosy: +python-dev ___

[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-08 Thread Tal Einat
Tal Einat added the comment: Thanks for the kind words, Francisco! And also for taking the time to get SearchBar working on Python3 and giving it a try. I agree that SearchBar is a huge improvement over IDLE's simple find and replace dialogs. And by now every potential user is used to such

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab5e2b0fba15 by Kristján Valur Jónsson in branch '3.3': The PyCOND_TIMEDWAIT must use microseconds for the timeout argument http://hg.python.org/cpython/rev/ab5e2b0fba15 New changeset 7764bb7f2983 by Kristján Valur Jónsson in branch '3.4': Merging

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Mateusz Łoskot
Mateusz Łoskot added the comment: On 8 May 2014 11:53, Tim Golden rep...@bugs.python.org wrote: What effect does your patch have on a VS2010 build? I don't know. I don't use VS2010. However, I suspect the option 1) fix should be applied anyway as it is suggested by the comment in

[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread Merlijn van Deen
Merlijn van Deen added the comment: Small typo that slipped in: 'udpate' instead of 'update' on the following lines: http://hg.python.org/cpython/rev/63fa945119cb#l2.18 http://hg.python.org/cpython/rev/63fa945119cb#l2.43 http://hg.python.org/cpython/rev/63fa945119cb#l2.66 --

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Tim Golden
Tim Golden added the comment: Attached project patch seems to build successfully on VS2010. It's possible that this failed in some way on VS2008; AFAICT it hasn't been touched since Brian first ported it two years ago. Adding Zach Ware for a second opinion. -- nosy: +zach.ware Added

[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e55089aa505 by R David Murray in branch '3.4': #21300: fix typo http://hg.python.org/cpython/rev/9e55089aa505 New changeset 232938736a31 by R David Murray in branch 'default': Merge #21300: fix typo http://hg.python.org/cpython/rev/232938736a31

  1   2   >