[issue22486] Add math.gcd()

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: Any more comments on this? The deadlines for new features in Py3.5 are getting closer. It seems we're just discussing details here, but pretty much everyone wants this feature. So, what are the things that still need to be done? Serhiy submitted working

[issue20485] Enable non-ASCII extension module names

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: PEP 489 (Redesigning extension module loading) includes the proposal to fix this by using punycode. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485

[issue23342] run() - unified high-level interface for subprocess

2015-04-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23342 ___ ___

[issue23356] In argparse docs simplify example about argline

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 050e0c0b3d90 by Berker Peksag in branch '2.7': Issue #23356: Simplify convert_arg_line_to_args example. https://hg.python.org/cpython/rev/050e0c0b3d90 -- ___ Python tracker rep...@bugs.python.org

[issue23356] In argparse docs simplify example about argline

2015-04-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks py.user. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23356 ___

[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-26 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23852 ___

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___ ___

[issue23356] In argparse docs simplify example about argline

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd8b99034121 by Berker Peksag in branch '3.4': Issue #23356: Simplify convert_arg_line_to_args example. https://hg.python.org/cpython/rev/bd8b99034121 New changeset 2d3ed019bc9f by Berker Peksag in branch 'default': Issue #23356: Simplify

[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7df280b311d0 by Gregory P. Smith in branch '3.4': Fix computation of max_fd on OpenBSD. Issue #23852. https://hg.python.org/cpython/rev/7df280b311d0 New changeset 08d0cc23fb00 by Gregory P. Smith in branch 'default': Fix computation of max_fd on

[issue22881] show median in benchmark results

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: Any more comments on the patch, or can it be applied? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22881 ___

[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23852 ___ ___

[issue24021] Add docstring to urllib.urlretrieve

2015-04-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +easy stage: - needs patch title: document urllib.urlretrieve - Add docstring to urllib.urlretrieve type: - enhancement versions: +Python 3.4, Python 3.5 ___ Python tracker

Best GUI for Python

2015-04-26 Thread Cecil Westerhof
I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the pros/cons of these two? Would there be a compelling reason to use another GUI? -- Cecil Westerhof Senior Software

Re: Question Installing latest Python

2015-04-26 Thread Steven D'Aprano
On Mon, 27 Apr 2015 01:00 am, Φώντας Λαδοπρακόπουλος wrote: Hello, Can you please tell me how to install latest Python 3.4.x without disturbing the other default python v2.7.5 intallation that i currently have on my VPS server and access it as Python 3? Thank you. Not unless you tell us

Re: Best GUI for Python

2015-04-26 Thread Steven D'Aprano
On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the pros/cons of these two? Would there be a compelling reason to

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 15c80f63ea1c by Antoine Pitrou in branch '3.4': Issue #23996: Avoid a crash when a delegated generator raises an unnormalized StopIteration exception. Patch by Stefan Behnel. https://hg.python.org/cpython/rev/15c80f63ea1c New changeset

[issue24058] Compiler warning for readline extension

2015-04-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Does simply removing the extern work? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24058 ___ ___

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch! -- resolution: - fixed stage: - resolved status: open - closed versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23996

[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2015-04-26 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13567 ___ ___

Re: Best GUI for Python

2015-04-26 Thread Cecil Westerhof
Op Sunday 26 Apr 2015 15:02 CEST schreef Cecil Westerhof: I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the pros/cons of these two? Would there be a compelling reason

[issue15339] document the threading facts of life in Python

2015-04-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: This seems somewhat related to the We need to document Python's concurrency and memory model that came out at the language summit this year. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-04-26 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23996 ___ ___

Re: Library import succeeds with nose, fails elsewhere

2015-04-26 Thread richmolj
On Saturday, April 25, 2015 at 7:53:27 PM UTC-4, Chris Angelico wrote: On Sun, Apr 26, 2015 at 9:36 AM, richm...@gmail.com wrote: The solution ended up being editing the top-level __init__.py: import awesome and then *when in a subdirectory*: import awesome_lib as awesome and

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: Could we have type slots for the new special methods? Otherwise, implementing the protocol in C would be fairly inefficient, especially for async iteration. I'm asking because Cython's generator type is not Python's generator type, but implementing the rest of

[issue24059] Minor speed and readability improvement to the random module

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, I give up. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24059 ___

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-26 Thread Dave Farrance
Mario Figueiredo mar...@gmail.com wrote: Other than replacing the random module with the probability density function for the exponential distribution, do you have a suggestion of how I could smooth the curve? Moving average. Try: def movingaverage(interval, window_size): window=

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-26 Thread Mario Figueiredo
On Sun, 26 Apr 2015 11:17:07 +0100, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote: Moving average. Try: def movingaverage(interval, window_size): window= numpy.ones(int(window_size))/float(window_size) return numpy.convolve(interval, window, 'same') y_av =

[issue24018] add a Generator ABC

2015-04-26 Thread Ludovic Gasc
Ludovic Gasc added the comment: Sorry guys to be basic for you, but if I take my AsyncIO end-user hat, I'm not sure to understand the potential end-user source code impacts to use Cython with Python 3.5 and AsyncIO. In concrete terms, it's only a low-level change, Cython will monkeypatch

[issue24061] Python 2.x breaks with address sanitizer

2015-04-26 Thread Hanno Boeck
Changes by Hanno Boeck ha...@hboeck.de: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24061 ___ ___ Python-bugs-list

[issue24061] Python 2.x breaks with address sanitizer

2015-04-26 Thread Hanno Boeck
New submission from Hanno Boeck: Right now it is not possible to build python 2.7.9 with address sanitizer. This issue has been worked around for python 3 in bug #18596 by marking some functions with attributes to tell address sanitizer to ignore them. I have attached a patch that will apply

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-04-26 Thread Yury Selivanov
Yury Selivanov added the comment: In fact I will likely add tp_await in the next PEP iteration. I need it to implement another feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017

[issue24018] add a Generator ABC

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Therefore, I think it's important to cover the complete protocol in the Generator ABC. I also think it's helpful to not require users to override throw() in a subclass, as they might not need it. Sorry, but I think you're fighting the fundament nature of

[issue23910] C implementation of namedtuple (WIP)

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought: the itemgetter.__call__ method is already pretty thin: if (!PyArg_UnpackTuple(args, itemgetter, 1, 1, obj)) return NULL; if (nitems == 1) return PyObject_GetItem(obj, ig-item); But you could add a special case for

[issue24050] [2.7] crash in third party module mopidy

2015-04-26 Thread STINNER Victor
STINNER Victor added the comment: mopidy is not maintained by Python. Report the bug to mopidy authors: https://www.mopidy.com/ -- nosy: +haypo resolution: - not a bug status: open - closed title: Segmentation fault (core dumped) - [2.7] crash in third party module mopidy

Re: Best GUI for Python

2015-04-26 Thread Chris Angelico
On Mon, Apr 27, 2015 at 6:26 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Tkinter is easier to use, as it is standard with Python. So long as you have Tk/Tcl installed on your computer, Tkinter should work fine. However,

Re: Tit for tat

2015-04-26 Thread Ben Finney
Seymore4Head Seymore4Head@Hotmail.invalid writes: Anyone here worked on trying a better strategy? If you want us to spend the time visiting a link, please spend the time yourself to summarise why it's relevant here. Do so in the initial post with the link. -- \ “Some mornings, it's just

[issue24061] Python 2.x breaks with address sanitizer

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4234b0dd2a54 by Benjamin Peterson in branch '2.7': allow 2.7 to be built with asan (closes #24061) https://hg.python.org/cpython/rev/4234b0dd2a54 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue23910] C implementation of namedtuple (WIP)

2015-04-26 Thread Joe Jevnik
Joe Jevnik added the comment: I was unable to see a performance increase by playing with the itemgetter.__call__ code; however, updating the propery code seemed to show a small improvement. I think that for simple indexing the cost of checking if it is a sequence outways the faster dispatch

[issue22881] show median in benchmark results

2015-04-26 Thread Wolfgang Maier
Wolfgang Maier added the comment: for the even number case, I think you shouldn't do // 2, but / 2. In general, wouldn't it be good to let the statistics module do all the stats calculations? -- ___ Python tracker rep...@bugs.python.org

[issue24018] add a Generator ABC

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: PEP 342 isn't really conclusive here as it intended to define the protocol based on the de-facto design of a yield-based generator function. Trying to abstract from that poses the question how a class based generator implementation should look like.

[issue22881] show median in benchmark results

2015-04-26 Thread Wolfgang Maier
Wolfgang Maier added the comment: ah sorry, it's late here already and I forgot what file this change is about. So forget my last comment then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22881

[issue23910] C implementation of namedtuple (WIP)

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the current property(itemgetter(index)) code has a Python creation step, but the actual attribute lookup and dispatch is done entirely in C (no pure python steps around the eval lookup). Rather than making a user visible C hack directly to

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2015-04-26 Thread Antti Haapala
Antti Haapala added the comment: +1 for this patch, the current documentation states it very wrong. -- nosy: +ztane ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22057 ___

[issue24059] Minor speed and readability improvement to the random module

2015-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Timing results on my machine: (Canopy 64bit) taniyama:~ mdickinson$ python3 -m timeit -s from math import sqrt; x = 3.14 sqrt(x) 1000 loops, best of 3: 0.0426 usec per loop (Canopy 64bit) taniyama:~ mdickinson$ python3 -m timeit -s from math import sqrt;

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-04-26 Thread Yury Selivanov
Yury Selivanov added the comment: Could we have type slots for the new special methods? Otherwise, implementing the protocol in C would be fairly inefficient, especially for async iteration. I don't think it's necessary to have slots for __aiter__, __anext__, __aenter__ and __aexit__.

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-26 Thread Denis McMahon
On Sat, 25 Apr 2015 23:33:10 +0100, Mario Figueiredo wrote: plot(list(results.keys()), list(results.values())) I found multiple plots in matplotlib. You need to specify which one you're using. The first thing you need to do is create a small self contained example of your problem. State

[issue24018] add a Generator ABC

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: In the lastest patch, the close() method is now a valid mixin method. However, the throw() method should be made abstract because it doesn't provide the required operation (it doesn't even use the self argument) or it should be left out entirely (i.e.

[issue24058] Compiler warning for readline extension

2015-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec6ed10d611e by Benjamin Peterson in branch '3.4': remove extern definition, since it's in a header file (closes #24058) https://hg.python.org/cpython/rev/ec6ed10d611e New changeset 192f9efe4a38 by Benjamin Peterson in branch '2.7': remove extern

Re: Best GUI for Python

2015-04-26 Thread Gary Herron
On 04/26/2015 11:07 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 19:12 CEST schreef Gary Herron: On 04/26/2015 09:32 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano: On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for

[issue23796] BufferedReader.peek() crashes if closed

2015-04-26 Thread John Hergenroeder
John Hergenroeder added the comment: It looks like my contributor form has gone through -- what should my next steps here be? Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23796

[issue22881] show median in benchmark results

2015-04-26 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: -- nosy: +wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22881 ___ ___

Re: Best GUI for Python

2015-04-26 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Tkinter is easier to use, as it is standard with Python. So long as you have Tk/Tcl installed on your computer, Tkinter should work fine. However, Tkinter probably looks a bit more old fashioned. It doesn't have to. By using the

[issue22881] show median in benchmark results

2015-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: In general, wouldn't it be good to let the statistics module do all the stats calculations? It's not available in older Python versions, e.g. 2.6. -- ___ Python tracker rep...@bugs.python.org

[issue22881] show median in benchmark results

2015-04-26 Thread Wolfgang Maier
Wolfgang Maier added the comment: It's not available in older Python versions, e.g. 2.6. I know, I was talking about 3.5+, of course. This would not be backported to Python2 anyway, would it? -- ___ Python tracker rep...@bugs.python.org

Tit for tat

2015-04-26 Thread Seymore4Head
https://www.youtube.com/watch?v=48EWLj3gIJ8 Anyone here worked on trying a better strategy? -- https://mail.python.org/mailman/listinfo/python-list

[issue24061] Python 2.x breaks with address sanitizer

2015-04-26 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24061 ___ ___ Python-bugs-list

Re: Best GUI for Python

2015-04-26 Thread Gary Herron
On 04/26/2015 09:32 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano: On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like

[issue24059] Minor speed and readability improvement to the random module

2015-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, I missed that the issue was already closed. Apologies for the excitement and the gratuitous exclamation marks in my previous messages. -- ___ Python tracker rep...@bugs.python.org

[issue24063] Support Mageia and Arch Linux in the platform module

2015-04-26 Thread Rémi Verschelde
New submission from Rémi Verschelde: Support for Mageia and Arch Linux was added in the platform module for Python 3.x [1, 2], but the fix was not backported to the 2.7.x branch. It would be nice to see these fixes cherry-picked for the incoming 2.7.10 release. [1]

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-26 Thread Cyd Haselton
Cyd Haselton added the comment: On a related note, I managed to get pip working with this build...minus some errors with verbose mode. I first had to make some edits to setup.py and Modules/Setup so that the build would find and make the _ssl and lzip modules. After running make install, I

[issue24059] Minor speed and readability improvement to the random module

2015-04-26 Thread Tim Peters
Tim Peters added the comment: Good catch, Mark! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24059 ___ ___ Python-bugs-list mailing list

[issue24062] links to os.stat() in documentation lead to stat module instead

2015-04-26 Thread July Tikhonov
New submission from July Tikhonov: Documentation of os.fstat() https://docs.python.org/3/library/os.html#os.fstat has a See also: section, which features a wrong link. The same with os.lstat(). Some of this problem was fixed (among other things) in issue 10960. But since then, two more wrong

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-26 Thread Mario Figueiredo
On Sun, 26 Apr 2015 18:55:27 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: The first thing you need to do is create a small self contained example of your problem. State the problem: Plot does not create the output you expect. Give an example: plot( [1,11], [5,5] ) Explain what

Re: Best GUI for Python

2015-04-26 Thread Cecil Westerhof
Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano: On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the

[issue22544] Inconsistent cmath.log behaviour

2015-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Per: yes, that's true. I don't think changing either division or multiplication is the way forward for this issue, though; I'd rather implement the less invasive change where `cmath.log` special-cases the situation where its second argument is real and

[issue5784] raw deflate format and zlib module

2015-04-26 Thread paul rubin
paul rubin added the comment: Hey, thanks for updating this. I still remember the nasty incident that got me filing this report in the first place. I'll look at the patch more closely when I get a chance, but the immediate comment I'd make is it's worth adding a sentence saying explicitly

Re: Best GUI for Python

2015-04-26 Thread Cecil Westerhof
Op Sunday 26 Apr 2015 19:12 CEST schreef Gary Herron: On 04/26/2015 09:32 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano: On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for Python. When searching I found (beside some others)

[issue24058] Compiler warning for readline extension

2015-04-26 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I tried another two case changing variable declaration. First case of just removing extern, Compiler similarly warns, and test passed. Second case of removing _PyOS_ReadlineTState declaration, Compiler has not warned, and test passed. First: $ hg diff diff

[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2015-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Those should be in the os module, not in sys. The os module is for interfaces to the operating system, while the sys module is for Python-specific stuff. As for the point of adding them, I don't find them useful, but I won't oppose it either :-) --

Re: Best GUI for Python

2015-04-26 Thread Mark Lawrence
On 26/04/2015 17:16, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 15:02 CEST schreef Cecil Westerhof: I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the pros/cons of

[issue24059] Minor speed and readability improvement to the random module

2015-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Gah! Peephole optimizer! When you do a timeit for '3.14 ** 0.5', you're just evaluating the time to retrieve a constant! In general, `**` is going to be both slower *and* less accurate than math.sqrt. Please don't make this change! --

Re: Best GUI for Python

2015-04-26 Thread IronManMark20
But just curious: what is the reason you use five different kinds of GUI? It seems like it makes think difficult for you. I mean the question as enlightenment for myself. A good question :). Most of this comes from the openness to create binding for many projects. Tkinter is a binding of

[issue24018] add a Generator ABC

2015-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the throw() method should be required. If you don't need throw(), send() or close(), then you aren't really asking for a full-blown generator: you are asking for an iterator, so you can just check for collections.Iterator. (PS: why is this bug

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-04-26 Thread Christie
Christie added the comment: @serhiy.storchaka - just double checking, do you guys need me to make any more changes to the patch? And is there any more review needed, or is it possible for this to be merged? Thanks very much! -- ___ Python tracker

[issue23910] C implementation of namedtuple (WIP)

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you have a chance, run a C profiler so we can see whether most of the time is being spent in an attribute lookup for the current property(itemgetter) approach versus your nt-indexer approach. Without a profile, I have only my instincts that the

Re: Tit for tat

2015-04-26 Thread Seymore4Head
On Mon, 27 Apr 2015 09:40:04 +1000, Ben Finney ben+pyt...@benfinney.id.au wrote: Seymore4Head Seymore4Head@Hotmail.invalid writes: Anyone here worked on trying a better strategy? If you want us to spend the time visiting a link, please spend the time yourself to summarise why it's relevant

Re: Tit for tat

2015-04-26 Thread Rustom Mody
On Monday, April 27, 2015 at 7:11:08 AM UTC+5:30, Seymore4Head wrote: On Mon, 27 Apr 2015 09:40:04 +1000, Ben Finney wrote: Seymore4Head writes: Anyone here worked on trying a better strategy? If you want us to spend the time visiting a link, please spend the time yourself to

[issue23910] C implementation of namedtuple (WIP)

2015-04-26 Thread Joe Jevnik
Joe Jevnik added the comment: This was very exciting, I have never run gprof before; so just to make sure I did this correctly, I will list my steps: 1. compile with the -pg flag set 1. run the test with ./python -m timeit ... 1. $ gprof python gmon.out profile.out Here is default: Each

[issue22619] Possible implementation of negative limit for traceback functions

2015-04-26 Thread Robert Collins
Robert Collins added the comment: Nice, looks pretty elegant to me. I have nothing to add to the prior reviewers comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___

Re: Function decorator having arguments is complicated

2015-04-26 Thread Chris Angelico
(Redirecting to the list - hope you don't mind) On Mon, Apr 27, 2015 at 2:36 PM, Makoto Kuwata k...@kuwata-lab.com wrote: On Mon, Apr 27, 2015 at 12:20 PM, Chris Angelico ros...@gmail.com wrote: I agree it would be nice to have extra parameters directly handled, but before you go further

[issue23668] Support os.ftruncate on Windows

2015-04-26 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23668 ___

[issue16669] Docstrings for namedtuple

2015-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, here's a proposed new classmethod that makes it possible to easily customize the field docstrings but without cluttering the API of the factory function: @classmethod def _set_docstrings(cls, **docstrings): '''Customize the field

Re: Function decorator having arguments is complicated

2015-04-26 Thread Ethan Furman
On 04/27, Makoto Kuwata wrote: I feel that function decorator having arguments is complicated, because three 'def' are nested: def multiply(n): def deco(func): def newfunc(*args, **kwargs): return n * func(*args, **kwargs) return newfunc return deco When

[issue23970] Update distutils.msvccompiler for VC14

2015-04-26 Thread Steve Dower
Steve Dower added the comment: Made some updates to the patch to use the existing infrastructure for setting include and library paths, and to fix bdist_wininst. While it may be worth doing more significant restructuring to help people with overriding aspects of build, that's almost certainly

Re: Tit for tat

2015-04-26 Thread John Ladasky
On Sunday, April 26, 2015 at 6:41:08 PM UTC-7, Seymore4Head wrote: Richard Dawkins explains with passion the idea of game theory and tit for tat, or why cooperation with strangers is often a strong strategy. He talks of a computer program tournament. I don't know what I could say that

Re: Function decorator having arguments is complicated

2015-04-26 Thread Ethan Furman
On 04/27, Chris Angelico wrote: On Mon, Apr 27, 2015 at 2:24 PM, Ethan Furman wrote: On 04/27, Makoto Kuwata wrote: I feel that function decorator having arguments is complicated, because three 'def' are nested: def multiply(n): def deco(func): def newfunc(*args,

Re: Function decorator having arguments is complicated

2015-04-26 Thread Chris Angelico
On Mon, Apr 27, 2015 at 2:45 PM, Ethan Furman et...@stoneleaf.us wrote: What's the advantage of that over a simple closure? You have the same number of nesting levels, plus a lot more boiler-plate repetition - instead of just referencing names from the outer scope, you have to explicitly

[issue23749] asyncio missing wrap_socket

2015-04-26 Thread Elizabeth Myers
Elizabeth Myers added the comment: For what it's worth, IRC has an optional STARTTLS extension which is implemented by some servers. IMAP and SMTP also have STARTTLS as a fundamental component of their protocols. As gc pointed out, LDAP also supports it. IMO this is a pretty glaring omission.

Re: Function decorator having arguments is complicated

2015-04-26 Thread Chris Angelico
On Mon, Apr 27, 2015 at 2:24 PM, Ethan Furman et...@stoneleaf.us wrote: On 04/27, Makoto Kuwata wrote: I feel that function decorator having arguments is complicated, because three 'def' are nested: def multiply(n): def deco(func): def newfunc(*args, **kwargs): return

[issue24064] Make the property doctstring writeable

2015-04-26 Thread Raymond Hettinger
New submission from Raymond Hettinger: I can't see any reason for property docstrings to be readonly: p = property(doc='basic') p.__doc__ 'basic' p.__doc__ = 'extended' Traceback (most recent call last): File pyshell#46, line 1, in module p.__doc__ =

Function decorator having arguments is complicated

2015-04-26 Thread Makoto Kuwata
I want to ask Python experts about function decorator which has arguments. I feel that function decorator having arguments is complicated, because three 'def' are nested: def multiply(n): def deco(func): def newfunc(*args, **kwargs): return n * func(*args, **kwargs)

Re: Tit for tat

2015-04-26 Thread Ben Finney
Seymore4Head Seymore4Head@Hotmail.invalid writes: Richard Dawkins explains with passion the idea of game theory and tit for tat, or why cooperation with strangers is often a strong strategy. He talks of a computer program tournament. Thanks! That is what would be great to have when you

Re: Function decorator having arguments is complicated

2015-04-26 Thread Chris Angelico
On Mon, Apr 27, 2015 at 12:37 PM, Makoto Kuwata k...@kuwata-lab.com wrote: If function decorator notation could take arguments, decorator definition would be more simple: def multiply(func, n): def newfunc(*args, **kwargs): return n * func(*args, **kwargs) return newfunc

[issue24018] add a Generator ABC

2015-04-26 Thread Guido van Rossum
Guido van Rossum added the comment: I'm with Raymond. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list

[issue23749] asyncio missing wrap_socket

2015-04-26 Thread Elizabeth Myers
Elizabeth Myers added the comment: What needs to be done to make this happen? I can try to implement it. -- nosy: +Elizacat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23749 ___