Re: The � debate

2014-05-10 Thread Gregory Ewing
Steven D'Aprano wrote: some_function(x, y+1)[key].attribute[num](arg)[spam or eggs] = 42 I'm pretty sure that it isn't common to call the LHS of that assignment a variable. A better way of putting it might be something in the data model that can be assigned to. -- Greg --

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 12:33:28 +1000, Chris Angelico wrote: On Sat, May 10, 2014 at 12:19 PM, Rustom Mody rustompm...@gmail.com wrote: For me, Marko's comment that variables in python are not first-class whereas in C they are is for me the most important distinction Ive seen (in a long time of

Re: How to implement key of key in python?

2014-05-10 Thread Andrea D'Amore
On 2014-05-10 03:28:29 +, eckhle...@gmail.com said: While it is fine for a small dataset, I need a more generic way to do so. I don't get how the dataset size affects the generality of the solution here. From your first message: attr = {} with open('test.txt','rb') as tsvin:

Re: The � debate

2014-05-10 Thread Chris Angelico
On Sat, May 10, 2014 at 3:58 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Steven D'Aprano wrote: some_function(x, y+1)[key].attribute[num](arg)[spam or eggs] = 42 I'm pretty sure that it isn't common to call the LHS of that assignment a variable. A better way of putting it might

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-10 Thread wxjmfauth
Le samedi 10 mai 2014 06:22:00 UTC+2, Rustom Mody a écrit : On Saturday, May 10, 2014 1:21:04 AM UTC+5:30, scott...@gmail.com wrote: Hi, here is a snippet of code that opens a file (fn contains the path\name) and first tried to replace all endash, emdash etc characters

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sat, May 10, 2014 at 4:15 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 10 May 2014 12:33:28 +1000, Chris Angelico wrote: 1) Passing them as parameters. You can pass a pointer to a variable, which is effectively the same as passing a variable to a function. No it

Re: The � debate

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 17:10:29 +1000, Chris Angelico wrote: On Sat, May 10, 2014 at 3:58 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Steven D'Aprano wrote: some_function(x, y+1)[key].attribute[num](arg)[spam or eggs] = 42 I'm pretty sure that it isn't common to call the LHS of that

Re: The “does Python have variables?” debate

2014-05-10 Thread Larry Hudson
On 05/09/2014 06:11 PM, Steven D'Aprano wrote: On Fri, 09 May 2014 17:34:17 -0500, Mark H Harris wrote: On 5/7/14 8:27 PM, Steven D'Aprano wrote: snip Why are new Python coders 'always' confused by this question of variable (name value) vs. {name: object} model of Python? Always? I

Re: Values and objects

2014-05-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Sat, May 10, 2014 at 8:34 AM, Marko Rauhamaa ma...@pacujo.net wrote: Right, Python's variables aren't like variables in C. Rather, Python's variables are like CPU registers. They cannot hold typed or structured objects and you can't pass references to them.

dynamic form application

2014-05-10 Thread edd . cowan
hello guys. i tryng to create a form builder application with a database backend. like wufoo.com im stuck,how do i use jquery to create dynamic forms,and how is the database designed for the actual forms and the data gathered using those forms i'd like to use rdbms preferebly postgres.

Re: The � debate

2014-05-10 Thread Chris Angelico
On Sat, May 10, 2014 at 5:48 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: https://en.wikipedia.org/wiki/Assignment_(computer_science) Go ahead, start an edit war at that page over its use of variable. :) Right there it talks about copying values into variables. So if Python

Re: Values and objects

2014-05-10 Thread Jussi Piitulainen
Marko Rauhamaa writes: To me, a variable is a variable is a variable. That works only in Python. Elsewhere, the sentence would be interpreted either as a variable is True or as a variable is False depending on whether a distinction without a difference is deemed helpful. --

Re: The � debate

2014-05-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Sat, May 10, 2014 at 3:58 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Steven D'Aprano wrote: some_function(x, y+1)[key].attribute[num](arg)[spam or eggs] = 42 I'm pretty sure that it isn't common to call the LHS of that assignment a variable.

Re: How to implement key of key in python?

2014-05-10 Thread Peter Otten
eckhle...@gmail.com wrote: On Saturday, May 10, 2014 10:30:06 AM UTC+8, MRAB wrote: On 2014-05-10 02:22, I wrote: I'm migrating from Perl to Python and unable to identify the equivalent of key of key concept. The following codes run well, import csv attr = {} with

Re: The � debate

2014-05-10 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Sat, May 10, 2014 at 5:48 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: https://en.wikipedia.org/wiki/Assignment_(computer_science) Go ahead, start an edit war at that page over its use of variable. :) Right there it talks about copying

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-10 Thread Tim Golden
On 10/05/2014 08:11, wxjmfa...@gmail.com wrote: Anyway, as Python may fail as soon as one uses an EM DASH or an EM DASH, I think it's not worth the effort to spend to much time with it. Nope -- seems all right to me. (Hopefully helping the OP out as well as rebutting a rather foolish

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 17:21:56 +1000, Chris Angelico wrote: On Sat, May 10, 2014 at 4:15 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 10 May 2014 12:33:28 +1000, Chris Angelico wrote: 1) Passing them as parameters. You can pass a pointer to a variable, which is

Re: The � debate

2014-05-10 Thread Rustom Mody
On Saturday, May 10, 2014 1:18:27 PM UTC+5:30, Steven D'Aprano wrote: Python assignment doesn't copy values. Maybe our values differ wink? -- https://mail.python.org/mailman/listinfo/python-list

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sat, May 10, 2014 at 7:09 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 10 May 2014 17:21:56 +1000, Chris Angelico wrote: No offence Chris, but I think this demonstrates that learning C causes brain damage and prevents clear logical thinking :-P You're not

Re: The � debate

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 11:18:59 +0300, Marko Rauhamaa wrote: In Python, x is a variable, a memory slot that can be assigned to, If your intention was to prove Ben Finney right, then you've done a masterful job of it. Python variables ARE NOT MEMORY SLOTS. (Not even local variables,

xmltodict - TypeError: list indices must be integers, not str

2014-05-10 Thread flebber
I am using xmltodict. This is how I have accessed and loaded my file. import xmltodict document = open(/home/sayth/Scripts/va_benefits/20140508GOSF0.xml, r) read_doc = document.read() xml_doc = xmltodict.parse(read_doc) The start of the file I am trying to get data out of is. meeting id=35483

Error while calling round() from future.builtins

2014-05-10 Thread Preethi
Hi, I am new to python. I am getting an error AttributeError: type object 'Decimal' has no attribute 'from_float' when I run the following in python prompt: from future.builtins import int, round int(round(5)) Traceback (most recent call last): File stdin, line 1, in module File

Re: Error while calling round() from future.builtins

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 04:39:05 -0700, Preethi wrote: Hi, I am new to python. I am getting an error AttributeError: type object 'Decimal' has no attribute 'from_float' when I run the following in python prompt: from future.builtins import int, round I get an error when I try that: py

Re: xmltodict - TypeError: list indices must be integers, not str

2014-05-10 Thread Peter Otten
flebber wrote: I am using xmltodict. This is how I have accessed and loaded my file. import xmltodict document = open(/home/sayth/Scripts/va_benefits/20140508GOSF0.xml, r) read_doc = document.read() xml_doc = xmltodict.parse(read_doc) The start of the file I am trying to get data out

Fortran (Was: The does Python have variables? debate)

2014-05-10 Thread Roy Smith
In article mailman.9805.1399597367.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com 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

Re: Error while calling round() from future.builtins

2014-05-10 Thread Jerry Hill
On Sat, May 10, 2014 at 7:39 AM, Preethi preethid...@gmail.com wrote: future==0.9.0 It looks like that library is out of date. The current version looks to be 0.12.0, and it also looks like this bug was fixed in the 0.12.0 release. I'd upgrade your version if at all possible. -- Jerry --

How can this assert() ever trigger?

2014-05-10 Thread Albert van der Horst
I have the following code for calculating the determinant of a matrix. It works inasfar that it gives the same result as an octave program on a same matrix. / def determinant( mat ): ''' Return the determinant of the n by n

Re: How can this assert() ever trigger?

2014-05-10 Thread Peter Otten
Albert van der Horst wrote: I have the following code for calculating the determinant of a matrix. It works inasfar that it gives the same result as an octave program on a same matrix. / def determinant( mat ): '''

Re: How can this assert() ever trigger?

2014-05-10 Thread Ethan Furman
What happens if you run the same matrix through Octave? By any chance, is nom just really, really small? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: How can this assert() ever trigger?

2014-05-10 Thread Gary Herron
On 05/10/2014 08:24 AM, Albert van der Horst wrote: I have the following code for calculating the determinant of a matrix. It works inasfar that it gives the same result as an octave program on a same matrix. / def determinant(

Re: How can this assert() ever trigger?

2014-05-10 Thread Alain Ketterlin
alb...@spenarnc.xs4all.nl (Albert van der Horst) writes: [...] Now on some matrices the assert triggers, meaning that nom is zero. How can that ever happen? mon start out as 1. and gets multiplied [several times] with a number that is asserted to be not zero. Finite precision. Try:

Re: How can this assert() ever trigger?

2014-05-10 Thread Albert van der Horst
In article 874n0xvd85@dpt-info.u-strasbg.fr, Alain Ketterlin al...@dpt-info.u-strasbg.fr wrote: alb...@spenarnc.xs4all.nl (Albert van der Horst) writes: [...] Now on some matrices the assert triggers, meaning that nom is zero. How can that ever happen? mon start out as 1. and gets

How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-10 Thread Simon Evans
I am new to Python, but my main interest is to use it to Webscrape. I have downloaded Beautiful Soup, and have followed the instruction in the 'Getting Started with Beautiful Soup' book, but my Python installations keep returning errors, so I can't get started. I have unzipped Beautiful Soup to

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 2:58 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Open up the command line prompt and navigate to the folder where you have unzipped the folder as follows: cd Beautiful Soup python setup python install This would be the operating system command line, not

NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread esawiek
Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about NumPy and SciPy and could not find any definitive answers to my questions,

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 3:07 AM, esaw...@gmail.com wrote: 4. In the long run, would it be better to use UNIX instead of Windows, if I were to use Python for all of my research? Yes. Absolutely yes. But that's because it's better to run Unix than Windows regardless of all other

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread Никола Вукосављевић
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10.5.2014 19:07, esaw...@gmail.com wrote: Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread Stefan Behnel
esaw...@gmail.com, 10.05.2014 19:07: Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about NumPy and SciPy and could not find any

Re: Fortran (Was: The does Python have variables? debate)

2014-05-10 Thread Terry Reedy
On 5/10/2014 9:42 AM, Roy Smith wrote: In article mailman.9805.1399597367.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Obsolete and Legacy? Fortran still receives regular standards updates (currently 2008, with the next revision due in 2015). Ars

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-10 Thread Terry Reedy
On 5/10/2014 1:03 PM, Chris Angelico wrote: On Sun, May 11, 2014 at 2:58 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Open up the command line prompt and navigate to the folder where you have unzipped the folder as follows: cd Beautiful Soup python setup python install This would be

Re: Values and objects

2014-05-10 Thread Ethan Furman
On 05/10/2014 02:32 AM, Chris Angelico wrote: Tell me, what may this function do in a compliant Python? def demo(): ret = spam spam = 23 return ret In CPython, that'll raise UnboundLocalError, because the local variable 'spam' does already exist, and currently has no value (no

Re: Values and objects

2014-05-10 Thread MRAB
On 2014-05-10 20:10, Ethan Furman wrote: On 05/10/2014 02:32 AM, Chris Angelico wrote: Tell me, what may this function do in a compliant Python? def demo(): ret = spam spam = 23 return ret In CPython, that'll raise UnboundLocalError, because the local variable 'spam' does

Question on Debugging a code line

2014-05-10 Thread subhabangalore
Dear Room, I was trying to go through a code given in http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[ Forward Backward is an algorithm of Machine Learning-I am not talking on that I am just trying to figure out a query on its Python coding.] I came across the following codes.

Re: The � debate

2014-05-10 Thread Ethan Furman
On 05/10/2014 02:05 AM, Rustom Mody wrote: On Saturday, May 10, 2014 1:18:27 PM UTC+5:30, Steven D'Aprano wrote: Python assignment doesn't copy values. Maybe our values differ? Obviously they do. Yours are irrelevant for Python. They could be, and probably are, useful when comparing and

Re: Values and objects

2014-05-10 Thread Ethan Furman
On 05/10/2014 12:22 PM, MRAB wrote: UnboundLocalError is like NameError, except that Python knows that the name is local because somewhere in the function you're binding to that name and you haven't said that it's global or nonlocal. Having a different exception for that case makes it clearer

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread esawiek
On Saturday, May 10, 2014 1:07:33 PM UTC-4, esa...@gmail.com wrote: Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread esawiek
On Saturday, May 10, 2014 1:07:33 PM UTC-4, esa...@gmail.com wrote: Hi All-- Let me state at the start that I am new to Python. I am moving away from Fortran and Matlab to Python and I use all different types of numerical and statistical recipes in my work. I have been reading about

Re: Values and objects

2014-05-10 Thread Terry Reedy
On 5/10/2014 3:10 PM, Ethan Furman wrote: On 05/10/2014 02:32 AM, Chris Angelico wrote: Tell me, what may this function do in a compliant Python? def demo(): ret = spam spam = 23 return ret In CPython, that'll raise UnboundLocalError, Note: issubclass(UnboundLocalError,

Re: NumPy, SciPy, Python 3X Installation/compatibility issues

2014-05-10 Thread Mark H Harris
On 5/10/14 12:07 PM, esaw...@gmail.com wrote: 4. In the long run, would it be better to use UNIX instead of Windows, if I were to use Python for all of my research? I concur with Chris and Stefan. The *nix model is faster, cleaner, and more secure. I prefer gnu/linux, but mac os/x is

Re: Values and objects

2014-05-10 Thread Terry Reedy
On 5/10/2014 3:22 PM, MRAB wrote: UnboundLocalError is like NameError, More specifically, isinstance(UnboundLocalError(), NameError) True This means that 'except NameError:' clauses written before the UnboundLocalError subclass was added still work and do not necessarily need to be

Re: Question on Debugging a code line

2014-05-10 Thread MRAB
On 2014-05-10 20:27, subhabangal...@gmail.com wrote: Dear Room, I was trying to go through a code given in http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm[ Forward Backward is an algorithm of Machine Learning-I am not talking on that I am just trying to figure out a query on

Re: Values and objects

2014-05-10 Thread Devin Jeanpierre
On Sat, May 10, 2014 at 12:10 PM, Ethan Furman et...@stoneleaf.us wrote: On 05/10/2014 02:32 AM, Chris Angelico wrote: Tell me, what may this function do in a compliant Python? def demo(): ret = spam spam = 23 return ret In CPython, that'll raise UnboundLocalError,

Re: xmltodict - TypeError: list indices must be integers, not str

2014-05-10 Thread flebber
On Saturday, 10 May 2014 22:10:14 UTC+10, Peter Otten wrote: flebber wrote: I am using xmltodict. This is how I have accessed and loaded my file. import xmltodict document = open(/home/sayth/Scripts/va_benefits/20140508GOSF0.xml, r) read_doc = document.read()

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 4:39 AM, Terry Reedy tjre...@udel.edu wrote: Since you have a space in the name, you'll need quotes: cd c:\Beautiful Soup Not for Win 7, at least C:\Users\Terrycd \program files C:\Program Files Huh, good to know. Unfortunately, Windows leaves command-line

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 5:10 AM, Ethan Furman et...@stoneleaf.us wrote: And if you don't like that argument (although it is a perfectly sound and correct argument), think of the module name space: ret = spam spam = 23 will net you a simple NameError, because spam has not yet been created.

Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 6:14 AM, Mark H Harris harrismh...@gmail.com wrote: Proprietary code and systems will not survive the 21st century, you can be sure of that. 'We' can never allow another Microsoft to rule again; not google, nor canonical, nor oracle, nor anyone else. 'We' must have net

Re: Values and objects

2014-05-10 Thread Ethan Furman
On 05/10/2014 04:18 PM, Chris Angelico wrote: On Sun, May 11, 2014 at 5:10 AM, Ethan Furman et...@stoneleaf.us wrote: And if you don't like that argument (although it is a perfectly sound and correct argument), think of the module name space: ret = spam spam = 23 will net you a simple

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 11:28 AM, Ethan Furman et...@stoneleaf.us wrote: Well, with function variables they have to exist *when you use them*. ;) This seems like more of a scoping issue than a can we create variables in Python issue. I am curious, though, what other python's do with respect

Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions.

2014-05-10 Thread Dave Angel
On 05/10/2014 07:23 PM, Chris Angelico wrote: There is a broad convention that spaces in file names get protected with quotes, though (for instance, tab completion will put quotes around them), so it's not complete chaos. Complete chaos is a pretty good description, especially since MS

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sun, 11 May 2014 09:18:34 +1000, Chris Angelico wrote: On Sun, May 11, 2014 at 5:10 AM, Ethan Furman et...@stoneleaf.us wrote: And if you don't like that argument (although it is a perfectly sound and correct argument), think of the module name space: ret = spam spam = 23 will net

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 14:03:11 -0700, Devin Jeanpierre wrote: On Sat, May 10, 2014 at 12:10 PM, Ethan Furman et...@stoneleaf.us wrote: On 05/10/2014 02:32 AM, Chris Angelico wrote: Tell me, what may this function do in a compliant Python? def demo(): ret = spam spam = 23

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 1:17 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: But that is an implementation detail. IronPython and Jython use an ordinary dict for local variable namespaces, just like globals. Consider this example from Jython: spam = def

Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-10 Thread Nelson Crosby
I also believe in this more 'BSD-like' view, but from a business point of view. No one is going to invest in a business that can't guarantee against piracy, and such a business is much less likely to receive profit (see Ardour). Don't get me wrong - I love free software. It's seriously awesome

Re: Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-10 Thread Rustom Mody
On Sunday, May 11, 2014 9:46:06 AM UTC+5:30, Nelson Crosby wrote: I also believe in this more 'BSD-like' view, but from a business point of view. No one is going to invest in a business that can't guarantee against piracy, and such a business is much less likely to receive profit (see

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sun, 11 May 2014 13:30:03 +1000, Chris Angelico wrote: On Sun, May 11, 2014 at 1:17 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: But that is an implementation detail. IronPython and Jython use an ordinary dict for local variable namespaces, just like globals. Consider

Re: Values and objects

2014-05-10 Thread Chris Angelico
On Sun, May 11, 2014 at 3:11 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Nonsense. Look at the original examples again, more closely. Here they are again, this time with comments: def test(): if False: spam = None # Dead code, never executed. d = locals()

Re: Values and objects

2014-05-10 Thread Rustom Mody
On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the same as ints, strings, floats etc. Otherwise, how could you tell the difference between a function

Re: Free vs proprietary (was Re: NumPy, SciPy, Python 3X Installation/compatibility issues)

2014-05-10 Thread Mark H Harris
On 5/10/14 11:16 PM, Nelson Crosby wrote: I also believe in this more 'BSD-like' view, but from a business point of view. No one is going to invest in a business that can't guarantee against piracy, and such a business is much less likely to receive profit (see Ardour). Don't get me wrong - I

Re: Values and objects

2014-05-10 Thread Ethan Furman
[accidentally went off-list; sorry] On 05/10/2014 02:03 PM, Devin Jeanpierre wrote: spam is referring to a local variable that has not been bound. This is not an implementation detail. The implementation detail is that in cpython there is a spot already reserved for what will be the 'spam'

Re: Values and objects

2014-05-10 Thread Ethan Furman
On 05/10/2014 10:22 PM, Chris Angelico wrote: It's that declaration that creates the variable, not changing locals(). A Python variable is a name bound to a value (and values, of course, are objects). If you don't have both pieces, you don't have a Python variable. -- ~Ethan~ --

[issue6305] islice doesn't accept large stop values

2014-05-10 Thread Alok Singhal
Alok Singhal added the comment: Uploading another patch which is the same as the last patch but this one applies cleanly after the latest islice changes for #21321. -- Added file: http://bugs.python.org/file35205/islice_large_values-4.patch ___

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-10 Thread Cybjit
Cybjit added the comment: On 2014-05-10 00:23, nikratio wrote: Is pip maybe doing its own certificate check, and relying on HTTPSConnection.host to contain the final hostname rather than the proxy? I think the culprit might be here

[issue19655] Replace the ASDL parser carried with CPython

2014-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: The avoid rebuilding part doesn't seem to work for me. Source build currently fails as follows: /bin/mkdir -p Include python ./Parser/asdl_c.py -h Include ./Parser/Python.asdl # Substitution happens here, as the completely-expanded BINDIR # is not available in

[issue21435] Segfault in gc with cyclic trash

2014-05-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: @Tim nothing to close, aiohttp is separate library based on asyncio. It just uses constructions like self.attr = None in __del__ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435

[issue19655] Replace the ASDL parser carried with CPython

2014-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: Stefan, you need to run `make touch` if you want to avoid rebuilding. See #15964 for more details. [all bots run `make touch` before building now] -- ___ Python tracker rep...@bugs.python.org

[issue19655] Replace the ASDL parser carried with CPython

2014-05-10 Thread Eli Bendersky
Eli Bendersky added the comment: This is also described in the Dev Guide: https://docs.python.org/devguide/setup.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19655 ___

[issue21466] General Index link to del statement is wrong

2014-05-10 Thread Apteris
New submission from Apteris: In the documentation index, https://docs.python.org/2/genindex-D.html, the link to the del statement documentation is not https://docs.python.org/2/reference/simple_stmts.html#del as it presumably should be, but

[issue21466] General Index link to del statement is wrong

2014-05-10 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21466 ___

[issue21425] Interactive interpreter doesn't flush stderr prompty

2014-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: This can be reproduced as easily under Linux: $ ./python 21 | cat Python 3.5.0a0 (default:17689e43839a+39f2a78f4357+, May 9 2014, 00:30:19) [GCC 4.8.1] on linux Type help, copyright, credits or license for more information. 5 5 1/0 nonsense Traceback (most

[issue21425] Interactive interpreter doesn't flush stderr prompty

2014-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attached patch fixes it under Linux, and adds tests. I'd be glad if someone could give it a run under Windows. -- keywords: +patch nosy: +ncoghlan, tim.golden, zach.ware stage: needs patch - patch review Added file:

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Steve Dower
New submission from Steve Dower: #20406 changed the icon used by IDLE, but forgot to include the new file in the Windows installer. As a result, IDLE won't start. I've attached a patch. 3.4 is unaffected, probably because msi.py changed significantly at some point. (I don't have commit

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'll declare this release-critical for the moment; I'm sure Benjamin will properly process it. As for getting access: send your ssh key to hgaccou...@python.org. -- priority: normal - release blocker ___ Python

[issue21459] DragonFlyBSD support

2014-05-10 Thread Brett Cannon
Brett Cannon added the comment: It was pointed out to me Dragonfly support is pre-existing, so I prematurely rejected this. Sorry about that. -- resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org

[issue21468] NNTPLib connections become corrupt after long periods of activity

2014-05-10 Thread James Meneghello
New submission from James Meneghello: After establishing an NNTP connection for a long-running process (up to hours at a time), the connection will eventually die and start producing infinite random garbage output, a small part of which is seen below. Any subsequent calls to the connection

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Tim Golden
Tim Golden added the comment: Steve -- re changes to PCBuild c.: worth liaising with Zach Ware (and, to a lesser extent, me) as he's been working through a number of things in that area and I know has other ideas. Just post a patch and nosy us both (zach.ware / tim.golden) Obviously, if it's

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Steve Dower
Steve Dower added the comment: Martin - sent. I think I need some bits flipped on my account here too. Will/can you take care of that for me? Tim - thanks. My next task was to figure out who else has an interest in this area. I wasn't sure if the 'windows' tag was accurate, but sounds like it

[issue21469] Hazards in robots.txt parser

2014-05-10 Thread Raymond Hettinger
New submission from Raymond Hettinger: * The can_fetch() method is not checking to see if read() has been called, so it returns false positives if read() has not been called. * When read() is called, it fails to call modified() so that mtime() returns an incorrect result. The user has to

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2014-05-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a9d34685ec47 by Brian Curtin in branch '2.7': Backport 4e9f1017355f from #3561. http://hg.python.org/cpython/rev/a9d34685ec47 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3561

[issue21464] fnmatch module uses regular expression with undefined result to perform matching

2014-05-10 Thread akira
akira added the comment: I don't see (?x) flag and it is not introduced by `res` regular expression that is constructed within translate() function in Lib/fnmatch.py import fnmatch fnmatch.translate('a b') 'a\\ b\\Z(?ms)' -- nosy: +akira

[issue21464] fnmatch module uses regular expression with undefined result to perform matching

2014-05-10 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: I see, so it's my misreading of the re module docs. I kinda thought that x in (?x) means any single-character flag of set (?aiLmsux). I was wrong, it is the specific literal flag. Also, rereading it again, the doc says the letters set the corresponding

[issue21332] subprocess bufsize=1 docs are misleading

2014-05-10 Thread akira
akira added the comment: I've asked about thread-safety of tests on python-dev mailing list: https://mail.python.org/pipermail/python-dev/2014-May/134523.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21332

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Creating issues with patches, so others can comment, is a good idea even when you have commit rights. Adding yourself to https://docs.python.org/devguide/experts.html#experts is a good way to test new commit rights. --

[issue19655] Replace the ASDL parser carried with CPython

2014-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: That fixes it. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19655 ___ ___ Python-bugs-list mailing

[issue21160] incorrect comments in nturl2path.py

2014-05-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35208/d7f128afe9db.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21160 ___

[issue21160] incorrect comments in nturl2path.py

2014-05-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file35208/d7f128afe9db.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21160 ___

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2014-05-10 Thread Ezio Melotti
Ezio Melotti added the comment: Aren't there similar benchmarks in the benchmarks repo? If not, would it be reasonable to add this there? -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org

[issue6305] islice doesn't accept large stop values

2014-05-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alok, have you signed a contributor agreement? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6305 ___ ___

[issue21467] IDLE icon not included in Windows installer

2014-05-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Steve, I am *really* glad you caught this. We obviously need a new test somewhere that would have caught this before the release. How is the installer tested now? Is it run and the installed python tested with the test suite? If so, a new idle test that runs

[issue20815] ipaddress unit tests PEP8

2014-05-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking as low priority. This patch really isn't worth applying. If someone wants to starting contributing, there are plenty of useful things to do (such as adding docstrings to elementtree). I don't want to encourage non-substantive shallow code churn

[issue21439] Numerous minor issues in Language Reference

2014-05-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I also don't agree with most of the typographic changes and, like Éric find some of the grammar changes to be pedantic. The OP refers to his own changes as editorial infelicities. This should have been a warning sign. The OP further warns, I have been

  1   2   >