Re: The "does Python have variables?" debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 3:40 PM, Rustom Mody 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 a 1990s viewp

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 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 writi

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 do

Re: trailing underscores naming convention_

2014-05-08 Thread Ian Kelly
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 good job for most of it, but I am having a bit > of troub

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 h

Re: The � debate

2014-05-08 Thread Ben Finney
Gregory Ewing 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 and other Python forum

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 12:21 PM, Roy Smith wrote: > In article <536c3049$0$29965$c3e8da3$54964...@news.astraweb.com>, > 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 >> applicatio

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 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 where that does not hold, where p

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 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 > declaimed the following: > >>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, Fortr

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 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

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 ter

Re: Real-world use of concurrent.futures

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 5:45 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> 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). May

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 writes: > [..] >> Python, on the other hand, has this behaviour:: >> >> foo = [1, 2, 3] >> bar = foo # ‘bar’ binds to the value ‘[1, 2, 3]’ assert >> fo

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 gre

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: https://mail.python.org/piperm

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: 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() [2

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 : 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 tha

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 : On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde 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 namespace) r

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 u

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 u

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

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

Re: Real-world use of concurrent.futures

2014-05-08 Thread Ian Kelly
On May 8, 2014 12:57 PM, "Andrew McLean" 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 discussions I ca

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: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Terry Reedy : >> On Thu, May 8, 2014 at 6:07 PM, Joseph Martinot-Lagarde >> 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 namespace) represents a pointer to a pointer

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 > 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 (which did

Re: Real-world use of concurrent.futures

2014-05-08 Thread Marko Rauhamaa
Andrew McLean : > 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 control. You'll need an

Re: Real-world use of concurrent.futures

2014-05-08 Thread Marko Rauhamaa
Chris Angelico : > 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 asynchronous > networ

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 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 UD

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 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 namespace) represents a pointe

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 in

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Marko Rauhamaa writes: > Ben Finney : > > > 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, spanking, admonishing, whatever.

Re: Real-world use of concurrent.futures

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 4:55 AM, Andrew McLean 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 possibility of TCP queri

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 c

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

2014-05-08 Thread Grant Edwards
On 2014-05-08, Skip Montanaro wrote: > On Thu, May 8, 2014 at 8:46 AM, Ethan Furman 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 few of them from the file o

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 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 small general aviation ai

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: 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: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 2:04 AM, Steven D'Aprano 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 box at > a fixed location" mod

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". >

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: data: protocol

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 4:34 AM, Robin Becker 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 lot of these '

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 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 >> utterly unique in the worl

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 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 Neil D. Cerutti
On 5/8/2014 8:41 AM, Roy Smith wrote: In article , Jerry Hill 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 all on this list. For people who a

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 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 > 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 *usef

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Fri, May 9, 2014 at 12:06 AM, Michael Torrie 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 > original poster a

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 any

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ethan Furman : > 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. We are real

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 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 shocking and so > counter-intuitive

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 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 that up and then tes

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 , Jerry Hill 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 all on this list. For people wh

Re: Using ssl.wrap_socket() in chroot jail

2014-05-08 Thread Grant Edwards
On 2014-05-08, Chris Angelico wrote: > On Thu, May 8, 2014 at 4:51 AM, Grant Edwards 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 give it to ssl.wrap_socket(). Tha

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

2014-05-08 Thread Grant Edwards
On 2014-05-07, Ian Kelly wrote: > On May 7, 2014 9:13 AM, "Chris Angelico" wrote: >> >> On Thu, May 8, 2014 at 1:06 AM, Burak Arslan > wrote: >> > Seeing how discussion is still going on about this, I'd like to state >> > once more what I said above in other words: You just need to do this: >> >

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 > 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

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 : > >> 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 r

Re: The “does Python have variables?” debate

2014-05-08 Thread Chris Angelico
On Thu, May 8, 2014 at 10:41 PM, Roy Smith 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, unle

Re: The “does Python have variables?” debate

2014-05-08 Thread Roy Smith
In article , Jerry Hill 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 all on this list. For people who are just learning programming, and are

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ben Finney : > Marko Rauhamaa 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. > > Wh

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Marko Rauhamaa 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 that? I haven't s

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

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'] year=swh.variables['year']

Re: The “does Python have variables?” debate

2014-05-08 Thread Marko Rauhamaa
Ben Finney : > 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 more accurate > m

Re: The “does Python have variables?” debate

2014-05-08 Thread Ben Finney
Ned Batchelder 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 term “variable”'s exis

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 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 how it's implemented in CPyth

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 writes: Ben Finney : 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 in all programming languages I know.

Re: The “does Python have variables?” debate

2014-05-08 Thread Johannes Schneider
On 08.05.2014 02:35, Ben Finney wrote: Marko Rauhamaa 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’ now == [1, "spa

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 Marko Rauhamaa
Rustom Mody : > 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 is thrown. Pointe