[RELEASED] Python 3.4.0b2

2014-01-07 Thread Larry Hastings
On behalf of the Python development team, I'm pleased to announce the second beta release of Python 3.4. This is a preview release, and its use is not recommended for production settings. Python 3.4 includes a range of improvements of the 3.x series, including hundreds of small improvements

Re: django question

2014-01-07 Thread CM
On Monday, January 6, 2014 8:57:22 PM UTC-5, Roy Smith wrote: Yes, exactly. There's nothing magic about a django view. It's just a function which is passed an instance of HttpRequest (and possibly a few other things, depending on your url mapping), and which is expected to return an

nested dictionaries and functions in data structures.

2014-01-07 Thread Sean Murphy
Hello all. I have some questions again. :-) I wish to be able to place a function within a data structure. I would like to use a dictionary because I could pass it a key and then the function could be called. I couldn't find anything on the net to show me how to do this. More then likely,

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Jean-Michel Pichavant
- Original Message - Hello all. I have some questions again. :-) I wish to be able to place a function within a data structure. I would like to use a dictionary because I could pass it a key and then the function could be called. I couldn't find anything on the net to show me

Re: More About Unicode in Python 2 and 3

2014-01-07 Thread Ned Batchelder
On 1/6/14 5:30 PM, Mark Lawrence wrote: On 06/01/2014 22:22, Ned Batchelder wrote: On 1/6/14 5:08 PM, Mark Lawrence wrote: On 06/01/2014 21:42, Ned Batchelder wrote: On 1/6/14 4:33 PM, Mark Lawrence wrote: That strikes me as being as useful as The PEP 393 FSR is completely wrong but I'm not

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Sean Murphy
Thanks for that. It resolved the issue and it was so simple compared to everything else I saw on the net. Only outstanding thing I have to work out is how to execute functions from a dictionary. I will continue searching on the net. Sean On 07/01/2014, at 9:21 PM, Jean-Michel Pichavant

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Steven D'Aprano
Sean Murphy wrote: Only outstanding thing I have to work out is how to execute functions from a dictionary. I will continue searching on the net. I don't quite understand this question. Do you mean something like this? def spam(n): return spam*n def eggs(n): return eggs*n d = {1:

Bytes indexing returns an int

2014-01-07 Thread Steven D'Aprano
Does anyone know what the rationale behind making byte-string indexing return an int rather than a byte-string of length one? That is, given b = b'xyz', b[1] returns 121 rather than b'y'. This is especially surprising when one considers that it's easy to extract the ordinal value of a byte:

Re: More About Unicode in Python 2 and 3

2014-01-07 Thread Ned Batchelder
On 1/6/14 11:01 PM, Steven D'Aprano wrote: On Mon, 06 Jan 2014 16:32:01 -0500, Ned Batchelder wrote: On 1/6/14 12:50 PM, Steven D'Aprano wrote: Ned Batchelder wrote: You are still talking about whether Armin is right, and whether he writes well, about flaws in his statistics, etc. I'm

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Frank Millman
Sean Murphy mhysnm1...@gmail.com wrote in message news:0cf6151e-e063-4252-9ac3-4fd4698eb...@gmail.com... Hello all. I have some questions again. :-) I wish to be able to place a function within a data structure. I would like to use a dictionary because I could pass it a key and then the

Re: Bytes indexing returns an int

2014-01-07 Thread Ervin Hegedüs
hi, On Tue, Jan 07, 2014 at 10:13:29PM +1100, Steven D'Aprano wrote: Does anyone know what the rationale behind making byte-string indexing return an int rather than a byte-string of length one? That is, given b = b'xyz', b[1] returns 121 rather than b'y'. This is especially surprising

Re: Bytes indexing returns an int

2014-01-07 Thread Steven D'Aprano
Ervin Hegedüs wrote: hi, On Tue, Jan 07, 2014 at 10:13:29PM +1100, Steven D'Aprano wrote: Does anyone know what the rationale behind making byte-string indexing return an int rather than a byte-string of length one? That is, given b = b'xyz', b[1] returns 121 rather than b'y'. This is

Re: nested dictionaries and functions in data structures.

2014-01-07 Thread Jean-Michel Pichavant
- Original Message - Thanks for that. It resolved the issue and it was so simple compared to everything else I saw on the net. Only outstanding thing I have to work out is how to execute functions from a dictionary. I will continue searching on the net. Sean This may help you

Re: the Gravity of Python 2

2014-01-07 Thread Martijn Faassen
On 01/07/2014 01:19 AM, Chris Angelico wrote: Can we get a run-down of everything that actually must be broken in 2.7 - 3.3, that can't be backported via __future__, so we can start cherry-picking which bits to break in 2.8? The biggest one is going to be Unicode strings, for a large number of

Re: Blog about python 3

2014-01-07 Thread wxjmfauth
Le dimanche 5 janvier 2014 23:14:07 UTC+1, Terry Reedy a écrit : On 1/5/2014 9:23 AM, wxjmfa...@gmail.com wrote: Le samedi 4 janvier 2014 23:46:49 UTC+1, Terry Reedy a écrit : On 1/4/2014 2:10 PM, wxjmfa...@gmail.com wrote: And I could add, I *never* saw once one soul, who is

Re: Bytes indexing returns an int

2014-01-07 Thread Terry Reedy
On 1/7/2014 6:13 AM, Steven D'Aprano wrote: Does anyone know what the rationale behind making byte-string indexing return an int rather than a byte-string of length one? That is, given b = b'xyz', b[1] returns 121 rather than b'y'. This former is the normal behavior of sequences, the latter

Re: Blog about python 3

2014-01-07 Thread Terry Reedy
On 1/7/2014 8:34 AM, wxjmfa...@gmail.com wrote: Le dimanche 5 janvier 2014 23:14:07 UTC+1, Terry Reedy a écrit : Memory: Point 2. A *design goal* of FSR was to save memory relative to UTF-32, which is what you apparently prefer. Your examples show that FSF successfully met its design goal.

Re: Bytes indexing returns an int

2014-01-07 Thread David Robinow
treating bytes as chars considered harmful? I don't know the answer to your question but the behavior seems right to me. Python 3 grudgingly allows the abomination of byte strings (is that what they're called? I haven't fully embraced Python3 yet). If you want a substring you use a slice. b =

Re: Bytes indexing returns an int

2014-01-07 Thread David Robinow
Sorry for top-posting. I thought I'd mastered gmail. -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-07 Thread Martijn Faassen
Hi there, I just tried this out with the future module to see what it actually does, and I got this: On 01/07/2014 01:54 PM, Martijn Faassen wrote: First the Python 3 behavior: py3str + py3str = py3str Yup, of course. py3bytes + py3bytes = py3bytes Again of course. py3str +

Re: Bytes indexing returns an int

2014-01-07 Thread Steven D'Aprano
David Robinow wrote: treating bytes as chars considered harmful? Who is talking about treating bytes as chars? You're making assumptions that aren't justified by my question. I don't know the answer to your question but the behavior seems right to me. This issue was raised in an earlier

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Michael Torrie
On 01/05/2014 04:30 PM, Ben Finney wrote: In short: Everything that was good about OpenOffice is now called LibreOffice, which had to change its name only because the owners of that name refused to let it go. Your information is a year or two out of date. OpenOffice.org is alive and well,

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Michael Torrie
On 01/06/2014 08:53 AM, Grant Edwards wrote: Yea, I think laying out a book with something like MS Word or LibreOffice is nuts. Depending on her formatting needs, a lighter-weight mark-up language (something like asciidoc) might suite: I've laid out a book with LibreOffice and it actually is

Re: the Gravity of Python 2

2014-01-07 Thread Martijn Faassen
Hi, I've posted a documentation issue to the 'future' module which includes a further evolution of my thinking. As I expected, the author of the 'future' module has thought this through more than I had: https://github.com/PythonCharmers/python-future/issues/27 To get back to a hypothetical

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 3:45 AM, Michael Torrie torr...@gmail.com wrote: I tend to add my own [styles] for quotes, captions, etc. After composing the document, then you modify the styles to set the spacings, fonts, indentations, border lines, etc. The workflow is very similar to using LyX, or

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 3:38 AM, Michael Torrie torr...@gmail.com wrote: [OpenOffice v4] is mostly feature identical to LibreOffice 4, and even has a couple of features that LibreOffice lacks. They really need to merge back into one project again, but I suspect they won't either for

Re: the Gravity of Python 2

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 3:42 AM, Martijn Faassen faas...@startifact.com wrote: To get back to a hypothetical Python 2.8, it could implement this kind of behavior, and I think it would help support incremental upgrades. As long as you're using Py 3 bytes and str in your code, you'll be aware of

Re: [way OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Michael Torrie
On 01/07/2014 09:58 AM, Chris Angelico wrote: On Wed, Jan 8, 2014 at 3:45 AM, Michael Torrie torr...@gmail.com wrote: I tend to add my own [styles] for quotes, captions, etc. After composing the document, then you modify the styles to set the spacings, fonts, indentations, border lines, etc.

Re: [way OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 4:10 AM, Michael Torrie torr...@gmail.com wrote: LO does reference images if you would like. But I find embedding the whole works is just more self-contained. And with multiple file documents the chances of losing data or messing with pagination are contained to

Re: [way OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Michael Torrie
On 01/07/2014 10:14 AM, Chris Angelico wrote: On Wed, Jan 8, 2014 at 4:10 AM, Michael Torrie torr...@gmail.com wrote: LO does reference images if you would like. But I find embedding the whole works is just more self-contained. And with multiple file documents the chances of losing data or

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Michael Torrie
Apologies to the list for the noise! Should have replied off-list. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bytes indexing returns an int

2014-01-07 Thread Ethan Furman
On 01/07/2014 07:19 AM, David Robinow wrote: Python 3 grudgingly allows the abomination of byte strings (is that what they're called?) No, that is *not* what they're called. If you find any place in the Python3 docs that does call them bytestrings please submit a bug report. On

Re: [Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]

2014-01-07 Thread MRAB
On 2014-01-07 17:46, Andrew Barnert wrote: I think Stephen's name 7-bit is confusing people. If you try to interpret the name sensibly, you get Steven's broken interpretation. But if you read it as a nonsense word and work through the logic, it all makes sense. On Jan 7, 2014, at 7:44,

Re: [Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]

2014-01-07 Thread Ethan Furman
On 01/07/2014 10:22 AM, MRAB wrote: On 2014-01-07 17:46, Andrew Barnert wrote: On Jan 7, 2014, at 7:44, Steven D'Aprano st...@pearwood.info wrote: I was thinking about Ethan's suggestion of introducing a new bytestring class and a lot of these suggestions are what I thought the bytestring

Re: Bytes indexing returns an int

2014-01-07 Thread Serhiy Storchaka
07.01.14 18:12, Steven D'Aprano написав(ла): In Python 2.7, if you have a chunk of binary data, you can easily do this: data = b'\xE1\xE2\xE3\xE4' data[0] == b'\xE1' and it returns True just as expected. data[0] == b'\xE1'[0] works as expected in both Python 2.7 and 3.x. --

Difficulty with ez_setup.py

2014-01-07 Thread Rzed
I am trying to run ez_setup.py on a fresh installation of Python 2.7.6 in a Win XP environment, but I keep getting an error. Here's the traceback: C:\Python27\Libpython ez_setup.py Extracting in c:\docume~1\dick\locals~1\temp\tmpkjidy0 Now working in

Re: django question

2014-01-07 Thread aerojunkemail
Django is great On Tuesday, January 7, 2014 12:55:07 AM UTC-7, CM wrote: On Monday, January 6, 2014 8:57:22 PM UTC-5, Roy Smith wrote: Yes, exactly. There's nothing magic about a django view. It's just a function which is passed an instance of HttpRequest (and possibly a few

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Ben Finney
Michael Torrie torr...@gmail.com writes: On 01/05/2014 04:30 PM, Ben Finney wrote: In short: Everything that was good about OpenOffice is now called LibreOffice, which had to change its name only because the owners of that name refused to let it go. Your information is a year or two out

Re: Blog about python 3

2014-01-07 Thread Tim Delaney
On 8 January 2014 00:34, wxjmfa...@gmail.com wrote: Point 2: This Flexible String Representation does no effectuate any memory optimization. It only succeeds to do the opposite of what a corrrect usage of utf* do. UTF-8 is a variable-width encoding that uses less memory to encode code

RFD: pt.comp.lang.python

2014-01-07 Thread kpippus
                  REQUEST FOR DISCUSSION (RFD)              unmoderated group pt.comp.lang.python This is a formal Request for Discussion (RFD) for the creation of the unmoderated newsgroup pt.comp.lang.python. NEWSGROUPS LINE: pt.comp.lang.python   Portuguese version of

Re: Blog about python 3

2014-01-07 Thread Terry Reedy
On 1/7/2014 9:54 AM, Terry Reedy wrote: On 1/7/2014 8:34 AM, wxjmfa...@gmail.com wrote: Le dimanche 5 janvier 2014 23:14:07 UTC+1, Terry Reedy a écrit : Memory: Point 2. A *design goal* of FSR was to save memory relative to UTF-32, which is what you apparently prefer. Your examples show

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 8:54 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: Sad. This is yet another of those politically-charged distinctions that, quite frankly, I have no interest in. I raised the point because you're giving advice to others on

Re: Bytes indexing returns an int

2014-01-07 Thread Steven D'Aprano
Ethan Furman wrote: On 01/07/2014 07:19 AM, David Robinow wrote: Python 3 grudgingly allows the abomination of byte strings (is that what they're called?) No, that is *not* what they're called. If you find any place in the Python3 docs that does call them bytestrings please submit a bug

Re: Bytes indexing returns an int

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 11:15 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Why decide that the bytes type is best considered as a list of bytes rather than a string of bytes? It doesn't have any list methods, it looks like a string and people use it as a string. As you have

Re: Bytes indexing returns an int

2014-01-07 Thread Ethan Furman
On 01/07/2014 04:15 PM, Steven D'Aprano wrote: Ethan Furman wrote: On 01/07/2014 07:19 AM, David Robinow wrote: Python 3 grudgingly allows the abomination of byte strings (is that what they're called?) No, that is *not* what they're called. If you find any place in the Python3 docs that

Re: Bytes indexing returns an int

2014-01-07 Thread Grant Edwards
On 2014-01-08, Chris Angelico ros...@gmail.com wrote: On Wed, Jan 8, 2014 at 11:15 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Why decide that the bytes type is best considered as a list of bytes rather than a string of bytes? It doesn't have any list methods, it looks like

Programing Challenge: Constructing a Tree Given Its Edges.

2014-01-07 Thread Xah Lee
Programing Challenge: Constructing a Tree Given Its Edges. Show you are the boss. http://xahlee.info/perl-python/python_construct_tree_from_edge.html here's plain text. ── ── ── ── ── Problem: given a list of edges of a tree: [child, parent], construct the

Re: Bytes indexing returns an int

2014-01-07 Thread Chris Angelico
On Wed, Jan 8, 2014 at 1:34 PM, Grant Edwards invalid@invalid.invalid wrote: On 2014-01-08, Chris Angelico ros...@gmail.com wrote: I think that, in hindsight, this was a major screw-up in Python 3. Which part was? The fact that b'ASDF'[0] in Python2 yeilds something different than it does

ANN: PyQt v5.2 Released

2014-01-07 Thread Phil Thompson
PyQt5 v5.2 has been released and is available from http://www.riverbankcomputing.com/software/pyqt/download5. PyQt5 is a comprehensive set of bindings for v5 of Digia's Qt cross-platform application framework. It supports Python v3, v2.7 and v2.6. The highlights of this release include full

Re: python finance

2014-01-07 Thread Mark Lawrence
On 08/01/2014 00:32, Dennis Lee Bieber wrote: On Tue, 7 Jan 2014 11:04:11 +1100, Chris Angelico ros...@gmail.com declaimed the following: Python finance could also be interpreted in many other ways, including I want to write a finance application in Python, and How does the PSF get its money?.

[issue14119] Ability to adjust queue size in Executors

2014-01-07 Thread Victor Varvariuc
Victor Varvariuc added the comment: Maybe I should have created another issue for this, but without this issue being solved, the new issue will not help much. Here it is: http://hg.python.org/cpython/file/37caaf21f827/Lib/concurrent/futures/thread.py#l63 After running an work item

[issue20157] Argument Clinic generates wrong keyword parameter name for default

2014-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For the default keyword parameter Argument Clinic generates wrong name default_value in the _keywords array. /*[clinic] module spam spam.ham default: int = 1 [clinic]*/ ... static PyObject * spam_ham(PyModuleDef *module, PyObject *args, PyObject

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset e09644eb6b20 by Gregory P. Smith in branch '2.7': Should fix the issue19081 fix on Windows. Don't let the previous http://hg.python.org/cpython/rev/e09644eb6b20 -- ___ Python tracker

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: It will be helpful to add the --clean option for the clinic tool, which removes all Argument Clinic generated code. -- messages: 207515 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Argument Clinic: add --clean

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: When would you want this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158 ___ ___ Python-bugs-list

[issue20157] Argument Clinic generates wrong keyword parameter name for default

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: I'll fix this but it's low priority for today. It's not a release blocker; we could release Python 3.4 with this bug. -- assignee: - larry priority: release blocker - normal ___ Python tracker

[issue20159] Convert the ElementTree module to use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which converts xml.etree.ElementTree accelerator module to use Argument Clinic. 34 methods are converted. Not converted __init__ methods (is Argument Clinic support it?) and the SubElement function which seems can't be converted.

[issue20159] Convert the ElementTree module to use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Argument Clinic generates wrong keyword parameter name for default, Argument Clinic: broken support for 'O!' ___ Python tracker rep...@bugs.python.org

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: updated 3.3 patch based off the changes made to the 2.7 one. -- Added file: http://bugs.python.org/file9/issue19081-33-gps05.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19081

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-07 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: Removed file: http://bugs.python.org/file33323/issue19081-33-gps04.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19081 ___

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-01-07 Thread Mark Dickinson
New submission from Mark Dickinson: The argument-passing code for passing structs larger than 8 bytes is broken on 64-bit Windows, leading to potential segmentation faults or other unpredictable behaviour. According to http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx structs not of

[issue20161] inspect.signature fails on some functions which use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: inspect.signature fails on some functions which use Argument Clinic. For example after applying issue20133 or issue20151 it fails for audioop.ratecv and binascii.a2b_qp. inspect.signature(audioop.ratecv) Traceback (most recent call last): File stdin,

[issue20151] Convert the binascii module to use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +inspect.signature fails on some functions which use Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20151

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +inspect.signature fails on some functions which use Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20148

[issue20133] Convert the audioop module to use Argument Clinic

2014-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +inspect.signature fails on some functions which use Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20133

[issue20161] inspect.signature fails on some functions which use Argument Clinic

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: I already noticed this; it'll be fixed in the patch for #20144. But thanks for the report! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20161 ___

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: For the record, I'd be very happy to accept a patch for this into 3.4 at any time. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20160 ___

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As fast as it is possible. This shouldn't be hard task, Argument Clinic already clean old generated code before inserting new code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: I meant, under what circumstances would you want to use this? I don't know why you would ever want --clean. Removing the output from the Argument Clinic blocks would break any file using it. And Argument Clinic is sufficiently fast, if you were worried

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Here's a second patch; I think this is ready to go in I cleaned up the node parsing a lot. It now knows how to parse the following types of default values: * Number (this applies to both ints and floats) * String ('hello') * Attribute (sys.maxsize) *

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Oops! I forgot to actually attach the new patch. I'm dumb. -- Added file: http://bugs.python.org/file33340/larry.simple.symbolic.constant.default.values.diff.2.txt ___ Python tracker rep...@bugs.python.org

[issue19723] Argument Clinic should add markers for humans

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Antoine just suggested that, if we used this accumulator thing, we'd want a convention for where the generated text should go. I actually have an answer for that: near the end, below the implementations of the module / class methods, but above the

[issue19723] Argument Clinic should add markers for humans

2014-01-07 Thread Stefan Krah
Stefan Krah added the comment: I think maybe I only showed it to Stefan Krah, who said it wouldn't help his use case so I dropped it. I think we were talking about _decimal, where any tool will interfere with the 100% code coverage patches. But that's a special case. --

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This would just make sources more readable and editable. While I read, write or edit code, I don't want generated code distract me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20158

[issue2263] struct.pack() + numpy int raises SystemError

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

[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

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

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: I don't think Argument Clinic should do this. It would leave the file in a broken state. But if it's an option on clinic.py it might tempt somebody into using it, then they'd be confused. If you want this functionality, please hack it up yourself locally.

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Attached is a new, simpler approach for supporting O!. The object() converter now takes two arguments: * type, which is the type you want the parameter declared as (e.g. PyUnicodeObject *) * subclass_of, which is the PyTypeObject you want to enforce

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
New submission from Yury V. Zaytsev: Hi, When I try the following: ./python -m test -v test_hash on a self-compiled Python 3.4.0b2 on RHEL 6.5 / ppc64, it fails. Please let me know which additional information I can supply to diagnose the problem. The complete traceback below: ==

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Interpreter Core nosy: +David.Edelsohn, christian.heimes, dmalcolm priority: normal - high type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20162

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: As requested by Victor Stinner: ./python -c 'import sys; print(sys.hash_info)' sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=103, algorithm='siphash24', hash_bits=64, seed_bits=128, cutoff=0) -- components:

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: Sorry for accidentally rolling back your changes to the bug, Antoine! -- components: +Interpreter Core -Tests type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20162

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Changes by Yury V. Zaytsev y...@shurup.com: -- components: +Tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20162 ___ ___ Python-bugs-list

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81f8b4744f1a by Victor Stinner in branch 'default': Issue #20162: test_hash_distribution() uses subTest() to mention the prefix in http://hg.python.org/cpython/rev/81f8b4744f1a -- nosy: +python-dev ___

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: == FAIL: test_hash_distribution (test.test_hash.HashDistributionTestCase) (prefix='abc') -- Traceback (most recent call

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is marked crash because Argument Clinic generates code which crashes. It is assigned to docs because this feature documentation is misleading. -- ___ Python tracker rep...@bugs.python.org

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: To check whether the problem is in the _le64toh() macro as suggested by Victor Stinner, I've tried the attached patch and the problem is gone. As it turns out, there actually seem to be two problems: First, HAVE_ENDIAN_H is properly defined, because the

[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

2014-01-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: I was also asked to mention this: https://github.com/majek/csiphash/blob/master/csiphash.c as an alternative implementation of siphash and platform checks. -- ___ Python tracker rep...@bugs.python.org

[issue19723] Argument Clinic should add markers for humans

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Patch attached. I tweaked the punctuation in the last line, from this: /*[clinic end generated code; checksum: {checksum}]*/ ^ ^ to this: | | v v

[issue20163] ValueError: time data does not match format

2014-01-07 Thread dellair jie
New submission from dellair jie: Hello, We are using Python 3.3.2 for HPUX11.31. The following error happens only on HPUX, works on SunOS, RHEL, AIX. python Python 3.3.2 (default, Dec 9 2013, 14:04:25) [C] on hp-ux11 Type help, copyright, credits or license for more information. from

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I don't think this should be documented as personally I wouldn't expect this use case to be working in the first place. -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org

[issue20163] ValueError: time data does not match format

2014-01-07 Thread STINNER Victor
STINNER Victor added the comment: Try to isolate which field fails. Example: import time time.strptime (10-Dec-13.20:07:49, %d-%b-%y.%H:%M:%S) time.struct_time(tm_year=2013, tm_mon=12, tm_mday=10, tm_hour=20, tm_min=7, tm_sec=49, tm_wday=1, tm_yday=344, tm_isdst=-1) time.strptime

[issue20158] Argument Clinic: add --clean option

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: Consider: if you ran clinic.py --clean on a C file, then tried to use make clinic, the makefile would first try to build the C file. But since the C file is now broken, the make would fail. And you can't use make clinic to regenerate the Clinic output.

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: There are lots of ways you can crash Python by giving erroneous input to Argument Clinic. Clinic has no visibility into the C type system, so it has no way of verifying whether or not the type objects you pass in are correct. That's unfixable and not really

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-07 Thread Larry Hastings
Larry Hastings added the comment: At Antoine's suggestion, I added a custom function to testcapi that exercises all the different possible types for default values in a text signature. Also the docs have been updated. LGTU? -- Added file:

[issue20163] ValueError: time data does not match format

2014-01-07 Thread dellair jie
dellair jie added the comment: Victor, Thanks for the comment. Isolated, the error happens at: import time time.strptime (Dec, %b) Traceback (most recent call last): File stdin, line 1, in module File /python/lib/python3.3/_strptime.py, line 494, in _strptime_time tt =

[issue20163] ValueError: time data does not match format

2014-01-07 Thread dellair jie
dellair jie added the comment: The output of command: $ date +'%b' Jan $ uname -a HP-UX test5 B.11.31 U ia64 4201936010 unlimited-user license -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20163

[issue19723] Argument Clinic should add markers for humans

2014-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: The new syntax is fine; I was only giving an example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19723 ___

[issue20163] ValueError: time data does not match format

2014-01-07 Thread STINNER Victor
STINNER Victor added the comment: time.strptime (Dec, %b) ValueError: unconverted data remains: Dec Ok, so what is the name of the December month? import time time.strftime(%b, time.gmtime(1387036705)) 'Dec' -- ___ Python tracker

[issue20164] Undocumented KeyError from os.path.expanduser

2014-01-07 Thread Chris Adams
New submission from Chris Adams: This is a more general version of #10496: os.path.expanduser is documented as returning the unmodified string if it cannot be expanded (http://docs.python.org/3/library/os.path.html#os.path.expanduser) but there's one edge case where this can fail: when

  1   2   3   >