Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Steven D'Aprano
On Sun, 24 Apr 2016 12:34 pm, Michael Torrie wrote: > There are many aspects to Pythonic programming, not just OOP. For > example using modules to store shared state for your program components > is very pythonic, rather than using classes. A module is kind of like a > singleton instance, and

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Steven D'Aprano
On Sun, 24 Apr 2016 12:03 pm, Christopher Reimer wrote: > On 4/23/2016 2:33 PM, Matt Wheeler wrote: >> This is still backwards to me. It prevents your classes from being >> suitable for restoring a stored game state, not just custom starting >> positions (which I think is what Ethan means by

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you suggest concrete wording? -- ___ Python tracker ___ ___

[issue24911] Context manager of socket.socket is not documented

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5f7980dd654 by Martin Panter in branch '3.5': Issue #24911: All socket objects are context managers; update examples https://hg.python.org/cpython/rev/d5f7980dd654 New changeset 711201953505 by Martin Panter in branch 'default': Issue #24911:

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread Martin Panter
Martin Panter added the comment: Serhiy’s patch looks worthwhile to me, though I still think a comment would help. There are lots of different cases being handled by those few lines: try: size = os.get_terminal_size(sys.__stdout__.fileno()) except (AttributeError, ValueError, OSError)

[issue23277] Cleanup unused and duplicate imports in tests

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Jon. I only removed sys and os since they were the most unused modules. -- resolution: -> fixed status: open -> closed versions: +Python 3.6 -Python 3.4, Python 3.5 ___ Python tracker

[issue23277] Cleanup unused and duplicate imports in tests

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6958bbf7f0ec by Berker Peksag in branch 'default': Issue #23277: Remove unused sys and os imports https://hg.python.org/cpython/rev/6958bbf7f0ec -- nosy: +python-dev ___ Python tracker

[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ad93528c39c by Martin Panter in branch '3.5': Issue #23806: Update susp-ignored.csv https://hg.python.org/cpython/rev/5ad93528c39c New changeset cb38785acc8d by Martin Panter in branch 'default': Issue #23806: Merge susp-ignored.csv from 3.5

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Michael Torrie
On 04/23/2016 09:41 PM, Christopher Reimer wrote: > I never wanted to learn Java in the first place. My community college > couldn't afford to renew the Microsoft site license, which local > employers required to learn C/C++ in MS Visual Studio, and all flavors > of Java got taught for the

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/23/2016 8:19 PM, Michael Torrie wrote: The reason you weren't taught beyond class inheritance is because Java implements organization only through a class hierarchy. Whole generations of Java programmers think that program organization is through classes (a static main method means your

[issue22359] Remove incorrect uses of recursive make

2016-04-23 Thread Martin Panter
Martin Panter added the comment: Thanks for your help with this Xavier. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Michael Torrie
On 04/23/2016 08:32 PM, Christopher Reimer wrote: > That's the other problem I'm running into. Building a chess engine is a > big project. This is probably bigger than the Java XML parser I built > from scratch for a college project. I can't seem to find any information > on how to build bigger

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/23/2016 7:34 PM, Michael Torrie wrote Procedural programming does not necessarily mean BASIC-style goto hell. Not sure why you would think that. In fact that's not really what procedural programming is about. I mentioned several messages back that I spent two years writing procedural

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Michael Torrie
On 04/23/2016 07:45 PM, Christopher Reimer wrote: > I had to confront all the bad habits I brought over Java and change my > code to be more Pythonic. This is where I started having fun, learning > the tricks and collapsing multi-line code into a single line code. I've > learned more about

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/23/2016 6:38 PM, Michael Selik wrote: Why so many files? Python can easily support thousands of lines in a file. If it's just one file any text editor can do a quick find-replace. That goes back to the Java convention of having one class per file. It took a while to convince myself that

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/23/2016 6:29 PM, Ian Kelly wrote: Python enums are great. Sadly, they're still not quite as awesome as Java enums. I remember enums more from C than Java. Although I haven't used them much in either language. I'm planning to immerse myself back into C via Cython. Depending on far I get

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/23/2016 2:33 PM, Matt Wheeler wrote: This is still backwards to me. It prevents your classes from being suitable for restoring a stored game state, not just custom starting positions (which I think is what Ethan means by custom setups). I haven't thought that far about saving the game

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/22/2016 1:40 PM, Michael Selik wrote: Frankly, for someone coming from Java, the best advice is to not write any classes until you must. Of course classes in Python are very useful. It's just that your Java habits are unnecessary and often counter-productive. I disagree. I wrote

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Michael Selik
On Sat, Apr 23, 2016 at 9:31 PM Christopher Reimer < christopher_rei...@icloud.com> wrote: > On 4/21/2016 10:25 PM, Stephen Hansen wrote: > > > > Why not, 'color in ("black", "white")'? > > Checkers seems popular around here. What if I want to change "white" to > "red," as red and black is a

[issue26549] co_stacksize is calculated from unoptimized code

2016-04-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This also affects co_consts, which includes constants that are no longer used by the optimized code: In [8]: def f(): return (1, 2, 3, 4, 5) ...: In [9]: f.func_code.co_consts Out[9]: (None, 1, 2, 3, 4, 5, (1, 2, 3, 4, 5)) In [12]: dis.dis(f) 2

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Ian Kelly
On Sat, Apr 23, 2016 at 7:00 PM, Christopher Reimer wrote: > On 4/21/2016 9:46 PM, Ethan Furman wrote: >> >> Oh! and Enum!!! ;) > > > OMG! I totally forgot about Enum. Oh, look. Python supports Enum. Now I > don't have to roll my own! > > Hmm... What do we use Enum

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/21/2016 10:25 PM, Stephen Hansen wrote: Why not, 'color in ("black", "white")'? Checkers seems popular around here. What if I want to change "white" to "red," as red and black is a common color scheme for checkers. Do I change a single constant variable or replace all the occurrences

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Michael Selik
On Sat, Apr 23, 2016 at 9:01 PM Christopher Reimer < christopher_rei...@icloud.com> wrote: > On 4/21/2016 9:46 PM, Ethan Furman wrote: > > Oh! and Enum!!! ;) > > OMG! I totally forgot about Enum. Oh, look. Python supports Enum. Now I > don't have to roll my own! > > Hmm... What do we use Enum

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Christopher Reimer
On 4/21/2016 9:46 PM, Ethan Furman wrote: Oh! and Enum!!! ;) OMG! I totally forgot about Enum. Oh, look. Python supports Enum. Now I don't have to roll my own! Hmm... What do we use Enum for? :) Thank you, Chris R. -- https://mail.python.org/mailman/listinfo/python-list

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread STINNER Victor
STINNER Victor added the comment: That's the manual page of the Linux kernel, not the glibc. It doesn't mean that the glibc implemented it. -- ___ Python tracker

[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f7b317124d6 by Berker Peksag in branch '3.5': Issue #26041: Remove "will be removed in Python 3.7" from description messages https://hg.python.org/cpython/rev/8f7b317124d6 New changeset 5d9f961edc30 by Berker Peksag in branch 'default': Issue

[issue19731] Fix copyright footer

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: 2001 is also appears in python.org footer. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 ___

[issue19731] Fix copyright footer

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7cb3364952d5 by Berker Peksag in branch '3.5': Issue #19731: Update copyright year in docs.p.o footer https://hg.python.org/cpython/rev/7cb3364952d5 New changeset fa0a941728a8 by Berker Peksag in branch 'default': Issue #19731: Update copyright

[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2016-04-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: Do we still want to remove the endtime parameter? -- nosy: +berker.peksag status: open -> pending ___ Python tracker ___

[issue18572] Remove redundant note about surrogates in string escape doc

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: I removed the sentence in 3.5 and default branches. -- nosy: +berker.peksag resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 ___

[issue18572] Remove redundant note about surrogates in string escape doc

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79e7808c3941 by Berker Peksag in branch '3.5': Issue #18572: Remove redundant note about surrogates in string escape doc https://hg.python.org/cpython/rev/79e7808c3941 New changeset ee815d3535f5 by Berker Peksag in branch 'default': Issue #18572:

[issue18353] PyUnicode_WRITE_CHAR macro definition missing

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report Wolf and thanks for the patch Corey. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: compile error -> behavior versions: +Python 3.5, Python 3.6 -Python 3.3

[issue18353] PyUnicode_WRITE_CHAR macro definition missing

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29e555e5956b by Berker Peksag in branch '3.5': Issue #18353: Remove PyUnicode_WRITE_CHAR macro link from c-api/unicode.rst https://hg.python.org/cpython/rev/29e555e5956b New changeset 8c53fdc011a3 by Berker Peksag in branch 'default': Issue #18353:

[issue21382] Signal module doesnt raises ValueError Exception

2016-04-23 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 ___ Python tracker

[issue21382] Signal module doesnt raises ValueError Exception

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1fcf68e6f4c7 by Berker Peksag in branch '3.5': Issue #21382: Clarify signal.signal() documentation on Windows https://hg.python.org/cpython/rev/1fcf68e6f4c7 New changeset 3e27b21e3a7d by Berker Peksag in branch 'default': Issue #21382: Clarify

[issue26089] Duplicated keyword in distutils metadata

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: I just committed Ezio's patch. Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26089] Duplicated keyword in distutils metadata

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 21e522177ca0 by Berker Peksag in branch 'default': Issue #26089: Remove duplicate field 'license' from DistributionMetadata https://hg.python.org/cpython/rev/21e522177ca0 -- nosy: +python-dev ___ Python

[issue20112] The documentation for http.server error_message_format is inadequate.

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Anastasia. -- nosy: +berker.peksag resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 ___ Python tracker

[issue20112] The documentation for http.server error_message_format is inadequate.

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset a912ca4f507b by Berker Peksag in branch '3.5': Issue #20112: Improve BaseHTTPRequestHandler.error_message_format documentation https://hg.python.org/cpython/rev/a912ca4f507b New changeset baed33df1aed by Berker Peksag in branch 'default': Issue

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread Marcos Dione
Marcos Dione added the comment: Already there: http://man7.org/linux/man-pages/man2/copy_file_range.2.html -- ___ Python tracker ___

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread STINNER Victor
STINNER Victor added the comment: Kerbel support ok, but what about the libc support? Do you know if it is planned? Or do you want to use the syscall() low-level API. If we take the syscall() path, I suggest to make the function private in the os module. Wait until the API is standardized in the

Re: How much sanity checking is required for function inputs?

2016-04-23 Thread Matt Wheeler
On 22 April 2016 at 04:11, Christopher Reimer wrote: > On 4/21/2016 7:10 PM, Ethan Furman wrote: >>> I do plan to incorporate a sanity test in each Piece class to validate >>> the initial position value. Pawns have 16 specific positions. Bishop, >>> Knight and Rook

Re: Remove directory tree without following symlinks

2016-04-23 Thread Random832
On Sat, Apr 23, 2016, at 12:29, Nobody wrote: > On Linux, an alternative is to use fchdir() rather than chdir(), which > changes to a directory specified by an open file descriptor Of course, then there's also the risk of running out of open file descriptors. High-quality implementations of rm

Re: Remove directory tree without following symlinks

2016-04-23 Thread Random832
On Sat, Apr 23, 2016, at 06:24, Steven D'Aprano wrote: > "rm -r" gives me a NameError when I run it in my Python script :-) > > But seriously, where is that documented? I've read the man page for > rm, and it doesn't say anything about treatment of symlinks, nor is > there an option to follow/not

[issue26039] More flexibility in zipfile write interface

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_write_after_read was added in issue14099. It doesn't test intended behavior, it tests existing behavior just in case to not change it unintentionally. It is desirable to preserve it, but if there is no simple way, may be we can change it. --

[issue11645] "Expand 10 after" on rietveld shows a duplicate line

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: I can't reproduce this with Chrome 49.0.2623.112 (64-bit). I guess this has already been fixed since 2011 (our fork's commit logs can be found at https://hg.python.org/tracker/rietveld/shortlog/bugs.python.org) -- nosy: +berker.peksag status: open ->

[issue14713] PEP 414 installation hook fails with an AssertionError

2016-04-23 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

Re: Remove directory tree without following symlinks

2016-04-23 Thread eryk sun
On Sat, Apr 23, 2016 at 4:34 AM, Albert-Jan Roskam wrote: > >> From: eryk...@gmail.com >> Date: Fri, 22 Apr 2016 13:28:01 -0500 >> On Fri, Apr 22, 2016 at 12:39 PM, Albert-Jan Roskam >> wrote: >> > FYI, Just today I found out that shutil.rmtree

[issue1283110] Give __len__() advice for "don't know"

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

[issue26834] Add truncated SHA512/224 and SHA512/256

2016-04-23 Thread Christian Heimes
New submission from Christian Heimes: SHA512/224 and SHA512/256 are truncated versions of SHA512. Just like SHA384 they use the same algorithm but different initial values and a smaller digest. I took the start vectors and test values from libtomcrypt. Like in my blake2 branch I have add

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread Marcos Dione
Marcos Dione added the comment: Debian Sid, arch Linux and Fedora FC24 (alpha) already have linux-4.5, others would certainly follow soon. Meanwhile, I could start developing the patch and we could review it when you think it's appropriate. -- ___

[issue23516] pip: urllib3 does not encode userinfo section of URL with authentication credentials

2016-04-23 Thread Berker Peksag
Berker Peksag added the comment: This was reported on urllib3 issue tracker: https://github.com/shazow/urllib3/issues/814 -- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue26800] Don't accept bytearray as filenames part 2

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Side comment about "bytes-like" and "byte string". As for language from PEP 484, I think it is too permissive. bytes and bytearray have are "bytes strings" because they are not only sequences of bytes, but have a lot of str-like methods: lower(), split(),

[issue26830] Refactor Tools/scripts/google.py

2016-04-23 Thread Francisco Couzo
Francisco Couzo added the comment: I was also going to refactor the other demo scripts, but first I wanted to make sure there was at least some kind of interest in it. -- ___ Python tracker

[issue26800] Don't accept bytearray as filenames part 2

2016-04-23 Thread Guido van Rossum
Guido van Rossum added the comment: I'm a little bit worried about removing support for bytearray in these cases. It used to be quite easy to support bytes and bytearray (just say you support the buffer API), and I even added language to PEP 484 suggesting that type checkers should consider

Re: Remove directory tree without following symlinks

2016-04-23 Thread Nobody
On Sat, 23 Apr 2016 00:56:33 +1000, Steven D'Aprano wrote: > I want to remove a directory, including all files and subdirectories under > it, but without following symlinks. I want the symlinks to be deleted, not > the files pointed to by those symlinks. Note that this is non-trivial to do

[issue26039] More flexibility in zipfile write interface

2016-04-23 Thread Thomas Kluyver
Thomas Kluyver added the comment: Martin, Serhiy: Am I right that it would be unacceptable to change the test, and I therefore need to find a way to allow writestr while a reading-mode handle is open? -- ___ Python tracker

[issue23507] Tuple creation is too slow

2016-04-23 Thread Demur Rumed
Demur Rumed added the comment: This code could be made to look a lot less hackish if the potential tuple reuse was abstracted by a PyTuple_UniqueOrNew(PyTuple) which returns its argument if REFCNT==1 otherwise allocates a tuple of the same size & returns that. It decrefs PyTuple if REFCNT !=

Re: Remove directory tree without following symlinks

2016-04-23 Thread Gregory Ewing
Steven D'Aprano wrote: But seriously, where is that documented? I've read the man page for rm, and it doesn't say anything about treatment of symlinks The Linux man page seems to be a bit deficient on this. The BSD version contains this sentence: The rm utility removes symbolic links,

Re: Remove directory tree without following symlinks

2016-04-23 Thread Steven D'Aprano
On Sat, 23 Apr 2016 06:13 pm, Paul Rubin wrote: > Steven D'Aprano writes: >> I want to remove a directory, including all files and subdirectories >> under it, but without following symlinks. I want the symlinks to be >> deleted, not the files pointed to by those symlinks. >

RE: Remove directory tree without following symlinks

2016-04-23 Thread Albert-Jan Roskam
> From: eryk...@gmail.com > Date: Fri, 22 Apr 2016 13:28:01 -0500 > Subject: Re: Remove directory tree without following symlinks > To: python-list@python.org > > On Fri, Apr 22, 2016 at 12:39 PM, Albert-Jan Roskam > wrote: > > FYI, Just today I found out that

[issue26811] segfault due to null pointer in tuple

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be using _PyObject_GC_UNTRACK() is more correct than setting the size to 0 or setting the item to None. But property_descr_get_gc_untrack.patch makes the code a little slower. Here is optimized version of Victor's patch. -- Added file:

[issue26831] ConfigParser parsing failures with default_section and ExtendedInterpolation options

2016-04-23 Thread SilentGhost
SilentGhost added the comment: I think there is some misunderstanding of what default_section is supposed to do, in fact in provides default values for *other* section, as the documentation says, it doesn't mangle section separation. In case of ExtendedInterpolation, the interpolation

[issue26359] CPython build options for out-of-the box performance

2016-04-23 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I've added the --with-optimizations option to configure, for CPython3 only at this point. If it looks good I'll create a version also for CPython2. -- Added file: http://bugs.python.org/file42576/cpython3_with_optimizations_v01.patch

PyCon JP 2016: Call for Proposals

2016-04-23 Thread Takayuki Shimizukawa
Hi everyone! We will hold PyCon Japan on September 21-22 this year in Tokyo and are looking for talk proposals. We hope to get a wide variety of talk submissions from first time speakers to seasoned veterans of PyCons around the world, so please don’t hesitate to submit your proposal. Please

[issue17233] http.client header debug output format

2016-04-23 Thread Kim Gräsman
Kim Gräsman added the comment: Thanks! I filed this so long ago that I'd forgotten about it. I ran the code in question with your patch manually hacked into my Python installation (3.4.1) and output is much easier to digest now. I don't have a strong opinion on key names -- I haven't needed

[issue26833] returning ctypes._SimpleCData objects from callbacks

2016-04-23 Thread Thomas
New submission from Thomas: If a callback function returns a ctypes._SimpleCData object, it will fail with a type error and complain that it expects a basic type. Using the qsort example: def py_cmp_func(a, b): print(a.contents, b.contents) return c_int(0) > TypeError: an integer is

Re: Remove directory tree without following symlinks

2016-04-23 Thread Paul Rubin
Steven D'Aprano writes: > I want to remove a directory, including all files and subdirectories under > it, but without following symlinks. I want the symlinks to be deleted, not > the files pointed to by those symlinks. rm -r shouldn't follow symlinks like you mention. --

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-23 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I uploaded a patch that skips these tests if optimizations are available. -- keywords: +patch Added file: http://bugs.python.org/file42574/issue26788.patch ___ Python tracker

[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16461a0016bf by Serhiy Storchaka in branch '3.5': Issue #26822: itemgetter, attrgetter and methodcaller objects no longer https://hg.python.org/cpython/rev/16461a0016bf New changeset 9b565815079a by Serhiy Storchaka in branch '2.7': Issue #26822:

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: map and zip should use the minimum, zip_longest should use the maximum, and filter shouldn't have __length_hint__(). -- ___ Python tracker

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-23 Thread STINNER Victor
STINNER Victor added the comment: I checked Python 2 for map(): it gets the length hint of all iterables and use the maximum, with a default of 8. I'm not sure of what you mean by errors, the function to get the length hint already catchs and ignores errors no? --

[issue25341] File mode wb+ appears as rb+

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > But this behaviour treating wb+ and rb+ as the same is well tested and seems to intended to do so. I think this is not intended behavior. Tests just test that the current behavior is not changed accidentally. If I'm right, the patch LGTM. But since

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d6bd32a56a8 by Benjamin Peterson in branch '2.7': fix python 3 mod init function declaration (closes #26827) https://hg.python.org/cpython/rev/8d6bd32a56a8 -- ___ Python tracker

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 188af2b4945a by Benjamin Peterson in branch '3.5': fix python 3 mod init function declaration (closes #26827) https://hg.python.org/cpython/rev/188af2b4945a New changeset df0e900b8860 by Benjamin Peterson in branch 'default': merge 3.5 (#26827)

[issue26634] recursive_repr forgets to override __qualname__ of wrapper

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. I would commit the patch to 3.5 too. -- nosy: +serhiy.storchaka stage: -> commit review versions: +Python 3.5 ___ Python tracker

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Xiang Zhang. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d14ea3964590 by Serhiy Storchaka in branch '3.5': Issue #26733: Disassembling a class now disassembles class and static methods. https://hg.python.org/cpython/rev/d14ea3964590 New changeset f96fec10cf25 by Serhiy Storchaka in branch 'default':

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: patch review -> commit review versions: +Python 3.5 ___ Python tracker

[issue26824] Make some macros use Py_TYPE

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No problems! You are welcome. I never read PEP3123 and it was a good opportunity to read this part of Python history. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python