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

2014-05-07 Thread Antoon Pardon
On 05-05-14 21:51, Grant Edwards wrote: > I'm working on a Python app that receives an e-mail message via SMTP, > does some trivial processing on it, and forwards it to another SMTP > server. > > I'd like to do the polite thing and add a "Received:" header, but I > can't figure out how to get Pytho

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

2014-05-07 Thread Emre Hasegeli
Antoon Pardon : > I'm working on a Python app that receives an e-mail message via SMTP, > > does some trivial processing on it, and forwards it to another SMTP > > server. > > > > I'd like to do the polite thing and add a "Received:" header, but I > > can't figure out how to get Python's email mod

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark Lawrence
On 07/05/2014 07:18, Marko Rauhamaa wrote: Ned Batchelder : Why is "variable" sacrosanct and can only be used to describe C semantics, but we're OK reusing class, int, and function? The Python language specification calls them variables; the terminology discussion should end there. I entir

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

2014-05-07 Thread Antoon Pardon
On 07-05-14 10:11, Emre Hasegeli wrote: > Antoon Pardon >: > > > I'm working on a Python app that receives an e-mail message via > SMTP, > > does some trivial processing on it, and forwards it to another SMTP > > server. > > > > I'd like

data: protocol

2014-05-07 Thread Robin Becker
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 least the default urlopener doesn't support data: Is there a way to use the residual legacy of the

Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jason Mellone
Hello, By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). I receive an error message that looks like the following: Installing easy_install-2.7.exe.manifest script to C:\Python27\Scripts Installed c:\python27\li

Re: Python under the sea and in space

2014-05-07 Thread sjmsoft
I don't suppose "eight miles high" in the figurative sense counts? Cheers, Steve J. Martin -- https://mail.python.org/mailman/listinfo/python-list

Good things come in small packages -Choose AWA s pay per click training programs!

2014-05-07 Thread AWA Hyd
Effective marketing lies in understanding the behavior of an average user as he uses the internet. Since most users access the internet with a purpose which is in most cases to look for information, search engines revolve around the most likely key phrases or words used by the user to launch suc

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jurko Gospodnetić
Hi. On 7.5.2014. 13:55, Jason Mellone wrote: By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). I receive an error message that looks like the following: Installing easy_install-2.7.exe.manifest script to C:\Pyt

Re: The “does Python have variables?” debate

2014-05-07 Thread Ethan Furman
On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: Actually, while Python variables are not first-class objects, one could see them as dictionary-key pairs. So you can even pass them by reference by passing the dictionary and the key. Well, you could pass them that way, but not necessarily change t

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jason Mellone
On Wednesday, May 7, 2014 9:44:14 AM UTC-4, Jurko Gospodnetić wrote: > Hi. > > > > On 7.5.2014. 13:55, Jason Mellone wrote: > > > By way of google I realize I am having what appears to be > > > a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). > > > > > > I receive an

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Wed, May 7, 2014 at 11:00 PM, Ethan Furman wrote: > On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: >> >> Actually, while Python variables are not first-class objects, one could >> see them as dictionary-key pairs. So you can even pass them by reference >> by passing the dictionary and the key. >

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Ethan Furman : > On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: >> Actually, while Python variables are not first-class objects, one >> could see them as dictionary-key pairs. So you can even pass them by >> reference by passing the dictionary and the key. > > Well, you could pass them that way, bu

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Chris Angelico : > That's because, while you can *think of* Python name bindings as being > like dict key/value pairs, they aren't always that. Function locals, > class locals, and other such namespaces aren't necessarily implemented > with dicts. They're conceptually still a "dictionary" of sorts

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 12:17 AM, Marko Rauhamaa wrote: > Weird. Some other tests of mine did work. But: > >Note: The contents of this dictionary should not be modified; changes >may not affect the values of local and free variables used by the >interpreter. [https://docs.python.org

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

2014-05-07 Thread Grant Edwards
On 2014-05-07, Antoon Pardon wrote: > On 07-05-14 10:11, Emre Hasegeli wrote: >> Antoon Pardon > >: >> >> > I'm working on a Python app that receives an e-mail message via >> SMTP, >> > does some trivial processing on it, and forwards it to another

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

2014-05-07 Thread Grant Edwards
On 2014-05-07, Antoon Pardon wrote: > On 05-05-14 21:51, Grant Edwards wrote: >> I'm working on a Python app that receives an e-mail message via SMTP, >> does some trivial processing on it, and forwards it to another SMTP >> server. >> >> I'd like to do the polite thing and add a "Received:" heade

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

2014-05-07 Thread Burak Arslan
On 05/06/14 18:26, Grant Edwards wrote: > On 2014-05-06, Burak Arslan wrote: >> On 05/06/14 12:47, Chris Angelico wrote: >>> On Tue, May 6, 2014 at 7:15 PM, alister >>> wrote: On Mon, 05 May 2014 19:51:15 +, Grant Edwards wrote: > I'm working on a Python app that receives an e-

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

2014-05-07 Thread Chris Angelico
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: > > "Received: blah\r\n" + message.to_string() > > or better: > > socket.write("Received: blah\r\n") >

Normal dict behavior?

2014-05-07 Thread antoine
Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? -- https://mail.python.org/mailman/listinfo/python-list

Why Islam? The Beauty and Benefits of Islam

2014-05-07 Thread bv4bv4bv4
Why Islam? The Beauty and Benefits of Islam Are all religions the same? How do I know which is correct? Why should I choose Islam? This pamphlet aims to discuss some of the beauties, benefits and unique aspects of Islam as compared to other beliefs and religions. 1. Close Relationship with the

Re: Normal dict behavior?

2014-05-07 Thread Ned Batchelder
On 5/7/14 11:06 AM, antoine wrote: Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? Because 0 == 0.0 -- Ned Batchel

Re: Normal dict behavior?

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:06 AM, antoine wrote: > Hi, > > Python 2.7.5 (default, Nov 20 2013, 14:20:58) > [GCC 4.7.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. {0.: None, 0:None} > {0.0: None} > > The second item disappeared! > > Why? > Is it normal? T

Re: Normal dict behavior?

2014-05-07 Thread Christian Heimes
On 07.05.2014 17:20, Ned Batchelder wrote: > Because 0 == 0.0 > hash(0) == hash(0.0) and 0 == 0.0 Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Normal dict behavior?

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:34 AM, Christian Heimes wrote: > hash(0) == hash(0.0) and 0 == 0.0 In theory, the former should be implied by the latter. Any deviation from that is a bug in __hash__ for the two objects. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Grant Edwards
Let's say you have a server/daemon application written in python that accepts incoming SSL connections. You want to run that application in a chroot jail. The last thing you want in that jail is your SSL certificate private key file. But, it appears the ssl module won't accept SSL certificates

Re: The “does Python have variables?” debate

2014-05-07 Thread Jerry Hill
On Wed, May 7, 2014 at 2:18 AM, Marko Rauhamaa wrote: > Ned Batchelder : > >> Why is "variable" sacrosanct and can only be used to describe C >> semantics, but we're OK reusing class, int, and function? > > The Python language specification calls them variables; the terminology > discussion should

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:42 AM, Grant Edwards wrote: > But, it appears the ssl module won't accept SSL certificates and keys > as data strings, or as stringio file objects. It will only accept a > filename, and it has to open/read that file every time a connection is > accepted. > > So how do you

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jurko Gospodnetić
Hi Jason, On 7.5.2014. 15:52, Jason Mellone wrote: So, is the answer: 1 - Until the patch is applied there is no answer or 2 - I can go in and manually modify the code, and have the ez setup work? I see the patch has just been applied to the setuptools development repo, so the bug will

python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use multiprocessing and a process pool under the covers. There seem to be a couple process issues: 1) The pid file created by DaemonRunner dissappears. This seems

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards wrote: > With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its > DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use > multiprocessing and a process pool under the covers. There seem to be > a couple process issues: > > 1) The pid file c

idle glitch while building python 3.4 from sources

2014-05-07 Thread Mark H Harris
hi folks, I got bit again trying to build python3.4 from sources (mea culpa, of course). The symptom is everything (except ensure pip) builds, installs, and runs fine with the small baby problem that IDLE will not run (-tkinter isn't even there) even though tcl/tk 8.5 is loaded and running.

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Christian Heimes
On 07.05.2014 17:42, Grant Edwards wrote: > Let's say you have a server/daemon application written in python that > accepts incoming SSL connections. > > You want to run that application in a chroot jail. > > The last thing you want in that jail is your SSL certificate private > key file. > >

Re: Pass variable by reference

2014-05-07 Thread Mark H Harris
On 5/6/14 6:46 PM, Chris Angelico wrote: Is there really a fundamental difference between languages in which that is equally valid syntax and does exactly the same thing? No. And from that standpoint, python has variables. I know, because I thought about python's 'variables' as variables for

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Ned Deily
In article , Mark H Harris wrote: > I know its my own fault (because I should just know this) but I got to > wondering about others who 'might not know' about the tcl/tk dev > packages and would be scratching their heads about why _tkinter is > missing and IDLE won't run, although tcl/tk is in

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Grant Edwards
On 2014-05-07, Christian Heimes wrote: > On 07.05.2014 17:42, Grant Edwards wrote: >> Let's say you have a server/daemon application written in python that >> accepts incoming SSL connections. >> >> You want to run that application in a chroot jail. >> >> The last thing you want in that jail i

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Ben Finney
Grant Edwards writes: > On 2014-05-07, Grant Edwards wrote: > > How do you terminate a Python program that's using multiprocessing? > > It looks like you have to kill all the threads individually. :/ As I understand it, the ‘multiprocessing’ module https://docs.python.org/3/library/multipr

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Ben Finney wrote: > Grant Edwards writes: > >> On 2014-05-07, Grant Edwards wrote: >> > How do you terminate a Python program that's using multiprocessing? >> >> It looks like you have to kill all the threads individually. :/ > > As I understand it, the ‘multiprocessing’ modu

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark H Harris
On 5/7/14 10:48 AM, Jerry Hill wrote: I think it's rather silly for someone to insist that python doesn't have variables. On the other hand, I think it can be useful to point out that python variable aren't like C variables, and that thinking of python variables as having two parts -- names and

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Mark H Harris
On 5/7/14 1:19 PM, Ned Deily wrote: If the Python build (the "make sharedmods" build step) can't successfully build the _tkinter extension module (because, for example, it couldn't find the Tk headers or libraries), the build step already reports that it could not build _tkinter. hi Ned, wher

Re: The “does Python have variables?” debate

2014-05-07 Thread Ben Finney
Mark H Harris writes: > So, when anyone points out that Python does not have variables, but > rather Python has names bound to objects... they are being most > helpful. > > As I pointed out earlier, I think the better approach would be to find > positive language for helping new folks understand

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards wrote: > With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its > DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use > multiprocessing and a process pool under the covers. There seem to be > a couple process issues: > > 1) The pid file

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Antoon Pardon
op 07-05-14 21:11, Grant Edwards schreef: > > Mainly, I'm just trying to figure out the right way to terminate the > server from an /etc/init script. > As far as I understand you have to make sure that your daemon is a proces group leader. All the children it will fork will then belong to its pro

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
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. Python currently does not allow me to obtain the "address" of a varia

Re: Pass variable by reference

2014-05-07 Thread Marko Rauhamaa
Mark H Harris : > A == B > True > > A is B > False > > [...] > > This is just one of a dozen 'different' kinds of examples. And the > answer is the same, Python does not have variables, Python has names > bound to objects. That is a different topic and isn't related to variables at all. Instead,

right click cut copy past context menu in IDLE in 3.4

2014-05-07 Thread Mark H Harris
Greetings, thanks to the folks who worked on the right click context menu in IDLE for python 3.4! Nice job. marcus -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark H Harris
On 5/7/14 4:15 PM, Marko Rauhamaa wrote: 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. Python currently does not allow me to obtai

Re: How to tell Script to use pythonw.exe ?

2014-05-07 Thread cube345
On Tuesday, July 2, 2013 9:20:12 PM UTC-4, goldtech wrote: > Hi, > > > > I want to run a .py file script using pythonw.exe so the DOS box will not > open. Is there a way from inside the script to say "run me with pythonw.exe > and not python.exe"? > > > > Thanks -- https://mail.python.org

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

2014-05-07 Thread Ian Kelly
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: > > > > "Received: blah\r\n" + message.to_str

Re: right click cut copy past context menu in IDLE in 3.4

2014-05-07 Thread Terry Reedy
On 5/7/2014 5:37 PM, Mark H Harris wrote: Greetings, thanks to the folks who worked on the right click context menu in IDLE for python 3.4! I am not one of those who directly worked on that, but on their behalf, "you'r wellcome'. -- Terry Jan Reedy -- https://mail.python.org/mailman/listin

Re: Python under the sea and in space

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 05:17:14 -0700, sjmsoft wrote: > I don't suppose "eight miles high" in the figurative sense counts? I'm afraid I don't know what "eight miles high" in the figurative sense means. There's at least two songs by that name, and a German movie, and I wonder whether you're thinkin

Re: The “does Python have variables?” debate

2014-05-07 Thread Ben Finney
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. Many established and still-popu

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 11:48:15 -0400, Jerry Hill wrote: > On Wed, May 7, 2014 at 2:18 AM, Marko Rauhamaa wrote: >> Ned Batchelder : >> >>> Why is "variable" sacrosanct and can only be used to describe C >>> semantics, but we're OK reusing class, int, and function? >> >> The Python language specific

Values and objects [was Re: Pass variable by reference]

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 00:22:55 +0300, Marko Rauhamaa wrote: > But hey, we can open another thread for whether Python has values or > objects! In Python, all values *are* objects. It isn't a matter of choosing one or the other. The value 1 is an object, not a native (low-level, unboxed) 32 or 64 b

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 16:35:00 -0500, Mark H Harris wrote: > On 5/7/14 4:15 PM, Marko Rauhamaa wrote: >>> 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 >>

Re: Pass variable by reference

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 4:11 AM, Mark H Harris wrote: > And we must never forget that CPython's underpinnings, uhm C, uses > variables, C ones... (never mind) Be careful of this one. It's utterly irrelevant to your point, and may be distracting. I could implement Ook in Python; does that mean tha

Re: The “does Python have variables?” debate

2014-05-07 Thread Ned Batchelder
On 5/7/14 8:35 PM, Ben Finney wrote: 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. Many

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 10:35:46 +1000, Ben Finney wrote: > 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

Value vs Identity (was Re: Pass variable by reference)

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 7:22 AM, Marko Rauhamaa wrote: > Mark H Harris : > >> A == B >> True >> >> A is B >> False >> >> [...] >> >> This is just one of a dozen 'different' kinds of examples. And the >> answer is the same, Python does not have variables, Python has names >> bound to objects. > > Th

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 11:27 AM, Steven D'Aprano wrote: > If I have understood correctly, and I welcome confirmation or correction, > one can have any combination of: > > * dynamic typing and name binding (e.g. Python and Ruby); > * static typing and name binding (e.g. Java); > * dynamic typing an

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Chris Angelico
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(). That still > leaves the third option (e.g. stu

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Ned Deily
In article <536a8c95.6050...@gmail.com>, Mark H Harris wrote: > On 5/7/14 1:19 PM, Ned Deily wrote: > > If the Python build (the "make sharedmods" build step) can't > > successfully build the _tkinter extension module (because, for example, > > it couldn't find the Tk headers or libraries), the

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 12:09:21 +1000, Chris Angelico wrote: > On Thu, May 8, 2014 at 11:27 AM, Steven D'Aprano > wrote: >> If I have understood correctly, and I welcome confirmation or >> correction, one can have any combination of: >> >> * dynamic typing and name binding (e.g. Python and Ruby); *

Re: The “does Python have variables?” debate

2014-05-07 Thread Dan Sommers
On Thu, 08 May 2014 01:27:08 +, Steven D'Aprano wrote: > If I have understood correctly, and I welcome confirmation or > correction, one can have any combination of: > * dynamic typing and name binding (e.g. Python and Ruby); > * static typing and name binding (e.g. Java); > * dynamic typing

Re: data: protocol

2014-05-07 Thread Steven D'Aprano
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 least the default > urlopener doesn't sup

Re: data: protocol

2014-05-07 Thread Ian Kelly
On Wed, May 7, 2014 at 4:42 AM, 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 least the default > urlopener doesn't support

Re: Python under the sea and in space

2014-05-07 Thread Ian Kelly
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. > > Please note that I'm interested in where the code was executed, and not, > say, where

Re: Unicode in Python

2014-05-07 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 c

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Ben Finney : > 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] > assert

Re: The “does Python have variables?” debate

2014-05-07 Thread Ben Finney
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 done for Python references), and that one can de-reference a pointer

Re: The "does Python have variables?" debate

2014-05-07 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