[issue28556] typing.py upgrades

2018-05-17 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +6624 ___ Python tracker ___ ___

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Your PRs made modifications to code and did not include a useful commit message or appropriate NEWS entries for the code modifications. Further, VSTS is unreliable. core-workflow made a premature decision to turn off Travis and AppVeyor

[issue33519] Should MutableSequence provide .copy()?

2018-05-17 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +6623 stage: -> patch review ___ Python tracker ___

Re: what does := means simply?

2018-05-17 Thread Ben Finney
Steven D'Aprano writes: > If you want to *really* see code that is hard to port, you should try > porting an Inform 7 program to another language. Any other language. Does porting Inform 7 code to Inform 6 count? They are very different languages :-) --

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: what does := means simply?

2018-05-17 Thread Ian Kelly
On Thu, May 17, 2018, 7:50 PM Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > > If you want to *really* see code that is hard to port, you should try > porting an Inform 7 program to another language. Any other language. > How about Z-code? *ducks* > --

[issue33565] strange tracemalloc results

2018-05-17 Thread Alexander Mohr
Change by Alexander Mohr : -- type: -> behavior ___ Python tracker ___ ___

[issue33565] strange tracemalloc results

2018-05-17 Thread Alexander Mohr
New submission from Alexander Mohr : while investigating https://github.com/boto/botocore/issues/1464 I used tracemalloc (like I've done before in 3.5.2) to try to figure out where the leak was. To my surprise tracemalloc listed stacks that didn't make any sense.

[issue33556] leftover thread crumb in threading.ident docstring

2018-05-17 Thread Skip Montanaro
Change by Skip Montanaro : -- keywords: +patch pull_requests: +6622 stage: needs patch -> patch review ___ Python tracker ___

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
ah there's no return question then that precisely returned the discussion to the first answer Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 17 May 2018, 23:35 Tobiah, wrote: > On 05/17/2018 09:25 AM, Ned Batchelder wrote: > > On 5/17/18 11:57 AM,

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset b2a02b9d88db04c12f800bc088afea0ef6862673 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-33564: Add async to IDLE's code context block openers. (GH-6960) (#6961)

[issue33547] Relative imports do not replace local variables

2018-05-17 Thread Rolf Campbell
Rolf Campbell added the comment: Thanks David, I agree that my assumption that the local valiables were not being replaced is not really what was going on there. I also agree that, while this might not strictly classify as a bug, it's probably not the most

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 02:17:39 +0100, bartc wrote: > Normally you'd use the source code as a start point. In the case of > Python, that means Python source code. But you will quickly run into > problems because you will often see 'import lib' and be unable to find > lib.py anywhere. Seriously?

[issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The Travis retest (for 3.7 backport) just failed with the same errors. Why can't we disable this tests. It now takes hours to do a merge with two backports. -- ___ Python tracker

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread miss-islington
miss-islington added the comment: New changeset eb4590e4d9abecdbbc91c3531df83e1f9bed50f1 by Miss Islington (bot) in branch '3.6': bpo-33564: Add async to IDLE's code context block openers. (GH-6960)

[issue28418] Raise Deprecation warning for tokenize.generate_tokens

2018-05-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Thomas. I've been a long term user of tokenize.generate_tokens() and would be sad to see it go. The underlying _tokenize() functionality is used else within the module, so there the no benefit to removing the API.

Re: what does := means simply?

2018-05-17 Thread bartc
On 17/05/2018 18:19, Steven D'Aprano wrote: On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: Of course, full-on Python code is pretty much impossible to port anywhere else anyway. *rolls eyes* Any pair of languages will have code that is hard to port from one to the other without jumping

[issue22552] ctypes.CDLL returns singleton objects, resulting in usage conflicts

2018-05-17 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31645] openssl build fails in win32 if .pl extension is not associated with Perl

2018-05-17 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just got the two broken pipe error on Travis. -- ___ Python tracker ___

[issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have also gotten test_async errors on AppVeyor and MSTS Windows. ERROR: test__sock_sendfile_native_failure (test.test_asyncio.test_base_events.BaseLoopSockSendfileTests)

[issue33554] Optimize PyDictObject

2018-05-17 Thread INADA Naoki
INADA Naoki added the comment: > A little performance optimization, but I think the key is not in performance optimization. > The semantics of the dictresize function are not uniform, and it is inconvenient for others to read. The dictresize function should be split to

Re: syntax oddities

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 08:38:31 +1000, Chris Angelico wrote: > On Fri, May 18, 2018 at 8:31 AM, Dennis Lee Bieber > wrote: >> On Thu, 17 May 2018 07:18:32 -0700, Tobiah declaimed >> the following: >> >>>Top posting is awesome for the reader plowing through a

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6621 ___ Python tracker ___

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6620 ___ Python tracker ___

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d89ca94847d943b883ebcc68e4f0a18cb042ed0d by Terry Jan Reedy in branch 'master': bpo-33564: Add async to IDLE's code context block openers. (GH-6960)

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +6619 stage: needs patch -> patch review ___ Python tracker ___

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Because BLOCKOPENERS is sufficiently distant from the changes for this issue, I will add 'async' now, without tests, in #33564. Some of my comments for this issue are ideas for future changes in codecontext.py. --

Re: object types, mutable or not?

2018-05-17 Thread Mike McClain
On Thu, May 17, 2018 at 07:28:44PM +1000, Chris Angelico wrote: > On Thu, May 17, 2018 at 7:16 PM, Anders Wegge Keller wrote: > > P?? Wed, 16 May 2018 14:48:27 +0100 > > Paul Moore skrev: > > > >> C++ called that an "rvalue". And then went on to define things

[issue33564] IDLE: add 'async' to codecontext block openers

2018-05-17 Thread Terry J. Reedy
New submission from Terry J. Reedy : I am just going to add 'async' to BLOCKOPENERS. I don't think this needs a particular test, as most of the openers are not used in the new tests added by #32831. We could eventually expand the sample to have one of each opener.

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-17 Thread Paul Goins
Paul Goins added the comment: I don't know enough about those tests and how important they are considered. My only concern would be with the increased risk of undetected breakage caused by removing them from CI, but if people think the risk is negligible and/or

Re: syntax oddities

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 8:44 AM, Paul wrote: >> >> >> That concept is meaningful only email between two parties, where >> the >> quoted material is a "courtesy copy" for content the other party likely >> provided a week earlier (snail mail). >> >> But mailing

Re: syntax oddities

2018-05-17 Thread Paul
> > > That concept is meaningful only email between two parties, where > the > quoted material is a "courtesy copy" for content the other party likely > provided a week earlier (snail mail). > > But mailing lists/newsgroups are the equivalent of a bulletin board > open to anyone

Re: syntax oddities

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 8:31 AM, Dennis Lee Bieber wrote: > On Thu, 17 May 2018 07:18:32 -0700, Tobiah declaimed the > following: > >>Top posting is awesome for the reader plowing through >>a thread in order. In that case the cruft at the bottom >>is only

[issue33459] Fix "tuple display" mention in Expressions

2018-05-17 Thread Andrés Delfino
Andrés Delfino added the comment: I'm restoring the original title since we are not sure it was incorrect after all. I have also updated the PR to remove the tuple display entry from the index. -- title: Define "tuple display" in the docs -> Fix "tuple display"

[issue33563] fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings

2018-05-17 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : In Lib/fileinput.py, passing bufsize=0 does not raise any DeprecationWarning. Also when using `input` the stacklevel could be better as it passes bufsize directly for FileInput. in Lib/test/test_fileinput.py ;

[issue33563] fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings

2018-05-17 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +6618 stage: -> patch review ___ Python tracker ___

file download using django and javascript

2018-05-17 Thread Xristos Xristoou
i have create a django app with REST JSON API and i fill html table in web page from my JSON. here some examples javascript snippets : var field22=document.getElementById('f22'); field22.innerHTML=e.target.feature.properties.id; var field23=document.getElementById('f23');

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
>new_list = list(x.remove(0)) >new_list = x.remove(0)[:] Please disregard :) kh -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ian Kelly
On Thu, May 17, 2018 at 3:27 PM, Karsten Hilbert wrote: >> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: >> > x = [0,1] >> > x.remove(0) >> > new_list = x >> > >> > instead i want in one go >> > >> > x = [0,1] >> > new_list = x.remove(0) # here a way for it to

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: > > x = [0,1] > > x.remove(0) > > new_list = x > > > > instead i want in one go > > > > x = [0,1] > > new_list = x.remove(0) # here a way for it to return the modified list by > > adding a .return() maybe ? > > There isn't a way to do that in

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: After this is merged, we should immediately add 'async' to the list of block openers. With complete tests, we can more confidently cleanup the code a bit, as well as change behavior. The fourth field of info tuples, block keyword, is never

[issue33562] Check that the global settings for asyncio are not changed by tests

2018-05-17 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +6617 stage: -> patch review ___ Python tracker ___

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-17 Thread David Bolen
David Bolen added the comment: A longer timeout might be another workaround, but for myself, I tend to favor Zachary's original suggestion of eliminating largefile tests for the moment as simplest and most robust. It would also reduce the overall percentage of test time

[issue33562] Check that the global settings for asyncio are not changed by tests

2018-05-17 Thread Brett Cannon
New submission from Brett Cannon : There were not checks in test.libregrtest.save_env to make sure tests were not mucking with the default event loop. The settings to check seem to be: 'asyncio.get_event_loop_policy', 'asyncio.get_event_loop', 'asyncio_get_exception_handler',

[issue28418] Raise Deprecation warning for tokenize.generate_tokens

2018-05-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've opened a PR moving in the other direction (making this public rather than deprecating it): https://github.com/python/cpython/pull/6957 -- nosy: +takluyver ___ Python tracker

[issue9969] tokenize: add support for tokenizing 'str' objects

2018-05-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've opened a PR for issue #12486, which would make the existing but undocumented 'generate_tokens' function public: https://github.com/python/cpython/pull/6957 I agree that it would be good to design a nicer API for this, but the

[issue12486] tokenize module should have a unicode API

2018-05-17 Thread Thomas Kluyver
Change by Thomas Kluyver : -- pull_requests: +6616 ___ Python tracker ___ ___

[issue12486] tokenize module should have a unicode API

2018-05-17 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Why not just bless the existing generate_tokens() function as a public API, Yes please, or just make the private `_tokenize` public under another name. The `tokenize.tokenize` method try to magically detect encoding which

[issue33559] Exception's repr change not documented

2018-05-17 Thread miss-islington
miss-islington added the comment: New changeset efa642779739b5af028b0f6ebb9033395e124273 by Miss Islington (bot) in branch '3.7': bpo-33559: Attribute changed repr of exceptions (GH-6954)

[issue25478] Consider adding a normalize() method to collections.Counter()

2018-05-17 Thread Vedran Čačić
Vedran Čačić added the comment: As I said above, if we're going to go down that route, it seems much more reasonable to me that total should be a cached property, that's updated on every Counter update (in __setitem__, increased by a difference of a new value and an old one

logging date format with milliseconds and timezone

2018-05-17 Thread Skip Montanaro
It seems that the logging.Formatter class uses two formats by default to format a time, default_time_format (%Y-%m-%d %H:%M:%S) and default_msec_format (%s,%03d). The former is a format string for time.strftime (and thus can't represent fractions of a second). The latter accomplishes that, but

ANN: Wing Python IDE 6.0.12 released

2018-05-17 Thread Wingware
Hi, We've just released Wing 6.0.12 , which adds wxPython 4 as a supported matplotlib backend, fixes remote development with Python 3.7, improves PEP287 docstring formatting errors, correctly updates the Source Assistant for remote files, fixes display

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Tobiah
On 05/17/2018 09:25 AM, Ned Batchelder wrote: On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: x = [0,1] x.remove(0) new_list = x Just call the original list 'new_list' to begin with. new_list = [0, 1] new_list.remove(0) There you are! --

Re: why does list's .remove() does not return an object?

2018-05-17 Thread David Stanek
On 17-May-2018 12:37, Ned Batchelder wrote: > On 5/17/18 12:28 PM, Dan Strohl via Python-list wrote: > > On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > > > I don't understand what this would return? x? You already have x. Is > > > it meant to make a copy? x has been mutated, so I don't

[issue33558] Python has no icon in taskbar and in start screen

2018-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: For me, 3.6.5 IDLE has the same Python app icon (white notebook page with blue/yellow snakes) as always. But I upgraded from 3.6.4, etc, so my Win10 machine already had the icon. Filip, which Windows (in case it makes a difference)? Which

[issue33559] Exception's repr change not documented

2018-05-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6615 ___ Python tracker ___

[issue25478] Consider adding a normalize() method to collections.Counter()

2018-05-17 Thread Allen Downey
Allen Downey added the comment: I'd like to second Raymond's suggestion. With just a few additional methods, you could support a useful set of operations. One possible API: def scaled(self, factor) """Returns a new Counter with all values multiplied by factor.""" def

[issue33559] Exception's repr change not documented

2018-05-17 Thread Steve Dower
Steve Dower added the comment: New changeset fb9dd8915314d857161de89fcbbb041f2b49fc22 by Steve Dower (Miro Hrončok) in branch 'master': bpo-33559: Attribute changed repr of exceptions (GH-6954)

[issue33554] Optimize PyDictObject

2018-05-17 Thread b@n
b@n added the comment: A little performance optimization, but I think the key is not in performance optimization. The semantics of the dictresize function are not uniform, and it is inconvenient for others to read. The dictresize function should be split to make it just

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Stefan Behnel
Stefan Behnel added the comment: Sorry, but you are proposing an API extension here that provides no benefits but duplicates existing functionality in a less versatile place. This is not going to happen. The second proposal (str(xml)) is actually not very helpful as it

[issue33559] Exception's repr change not documented

2018-05-17 Thread Steve Dower
Steve Dower added the comment: New changeset 54fc49737a6a79f6e2ece16e22b233858b836567 by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-33559: Document changed repr of exceptions (GH-6943) (GH-6950)

[issue33559] Exception's repr change not documented

2018-05-17 Thread Steve Dower
Steve Dower added the comment: It's worth documenting. I'll merge the next PR with the attribution. -- ___ Python tracker ___

[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok
Miro Hrončok added the comment: I was bit by this, so that's why I think this is worth documenting. https://github.com/testing-cabal/testtools/issues/270 -- ___ Python tracker

[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok
Change by Miro Hrončok : -- pull_requests: +6614 ___ Python tracker ___ ___

[issue33559] Exception's repr change not documented

2018-05-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was done in issue30399, and I was not sure that this change is worth adding in What's New. Add a reference to the issue. -- nosy: +serhiy.storchaka ___ Python tracker

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 3:48 AM, Steven D'Aprano wrote: > On Fri, 18 May 2018 03:44:25 +1000, Chris Angelico wrote: > >> I'm morbidly curious as to what "half-on Python code" would look like. > > Writing Java in Python. Or C in Python. Or Lisp in Python. Or

[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-17 Thread Paul Goins
Paul Goins added the comment: Also, to be clear, I understand what David is saying and don't disagree at all. And if this really is Spectre related, it may be difficult to "go back" and test a before case, so my last comment about "digging in" may be rather moot. Does

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 03:44:25 +1000, Chris Angelico wrote: > I'm morbidly curious as to what "half-on Python code" would look like. Writing Java in Python. Or C in Python. Or Lisp in Python. Or ... -- Steve -- https://mail.python.org/mailman/listinfo/python-list

[issue33559] Exception's repr change not documented

2018-05-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6613 ___ Python tracker ___

[issue33559] Exception's repr change not documented

2018-05-17 Thread Steve Dower
Steve Dower added the comment: New changeset 631753fcc5e88bbbad402933e77295675cfe1fee by Steve Dower (Miro Hrončok) in branch 'master': bpo-33559: Document changed repr of exceptions (GH-6943)

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Steven Vascellaro
Steven Vascellaro added the comment: Alternatively, the most intuitive solution would be to give `Element` an explicit `__str__` method. The current behavior of `str(Element)` is to return the object's location in memory. ``` from xml.etree import ElementTree xml =

Package DLL or SO in wheel

2018-05-17 Thread Chris Nyland
Hello, We have several internal modules we have developed that are used mostly to read different types of data files. Most of the time the different data file formats come with some sort of DLL or SO files that gives a standard interface to read the files. Our design pattern is to create a python

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 3:34 AM, Steven D'Aprano wrote: > On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > >> Of course, full-on Python code is pretty much impossible to port >> anywhere else anyway. > > Oh, I forgot to mention... given that Python is

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-17 Thread Emily Morehouse
Change by Emily Morehouse : -- nosy: +emilyemorehouse ___ Python tracker ___ ___

Re: object types, mutable or not?

2018-05-17 Thread Ben Bacarisse
Anders Wegge Keller writes: > På Wed, 16 May 2018 14:48:27 +0100 > Paul Moore skrev: > >> C++ called that an "rvalue". And then went on to define things that >> could go on the left hand side of an assignment as "lvalues". And now >> we have two confusing

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > Of course, full-on Python code is pretty much impossible to port > anywhere else anyway. Oh, I forgot to mention... given that Python is frequently used to prototype applications before the production-ready application is written in C, C++ or

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 17:50:22 +0300, Marko Rauhamaa wrote: > bartc : >> Anyway, try this: >> >> def showarg(x): print(x) >> >> def dummy(*args,**kwargs): pass >> >> dummy(a=showarg(1),*[showarg(2),showarg(3)]) >> >> This displays 2,3,1 showing that evaluation is not

[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also What’s New In Python 3.3: https://docs.python.org/3/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator And PEP 380 itself. -- ___ Python tracker

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > On 17/05/2018 15:03, Chris Angelico wrote: >> On Thu, May 17, 2018 at 9:58 PM, bartc wrote: >>> On 17/05/2018 04:54, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: >

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2018-05-17 Thread Steven Vascellaro
New submission from Steven Vascellaro : In Python 3.6, converting an xml `xml.etree.ElementTree.Element` to a string is done using `xml.etree.ElementTree.tostring()`. ``` from xml.etree import ElementTree xml = ElementTree.Element('Person', Name='John')

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-17 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___

[issue33558] Python has no icon in taskbar and in start screen

2018-05-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> terry.reedy components: +IDLE, Windows nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware type: performance -> behavior versions: +Python 3.6 -Python 3.5 ___

[issue33548] tempfile._candidate_tempdir_list should consider common TEMP locations

2018-05-17 Thread Steve Dower
Steve Dower added the comment: Merged as part of the VSTS PR (it was needed to fix some tests on the Windows build machine) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33560] tuple.index() could return a more explicit error message

2018-05-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue13349. -- nosy: +serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Non-informative error message in index() and remove() functions

[issue33533] Provide an async-generator version of as_completed

2018-05-17 Thread Yury Selivanov
Yury Selivanov added the comment: I like the idea. Let's revisit it after Python 3.7 is released. -- ___ Python tracker ___

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-17 Thread Yury Selivanov
Yury Selivanov added the comment: > Deprecating Event.wait would be incorrect because Event was designed to mimic > the threading.Event class which has a (blocking) wait() method[1]. This is rather important. I'd like to continue maintaining this similarity. Adding

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ned Batchelder
On 5/17/18 12:28 PM, Dan Strohl via Python-list wrote: On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: I don't understand what this would return? x? You already have x. Is it meant to make a copy? x has been mutated, so I don't understand the benefit of making a copy of the 1-less x.

[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-17 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't a priority now, so let's postpone the discussion on this until 3.7 is released. -- ___ Python tracker

[issue33560] tuple.index() could return a more explicit error message

2018-05-17 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6612 stage: -> patch review ___ Python tracker ___

RE: why does list's .remove() does not return an object?

2018-05-17 Thread Dan Strohl via Python-list
On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > I don't understand what this would return? x? You already have x. Is > it meant to make a copy? x has been mutated, so I don't understand the > benefit of making a copy of the 1-less x. Can you elaborate on the > problem you are trying

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ned Batchelder
On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: x = [0,1] x.remove(0) new_list = x instead i want in one go x = [0,1] new_list = x.remove(0) # here a way for it to return the modified list by adding a .return() maybe ? There isn't a way to do that in one line.  I often find myself

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: I believe the main argument for -X options is the fact that cmd on Windows doesn't offer a nice way of setting environment variables as part of the command invocation (hence "-X utf8", for example). As far as setting values for X options

[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 6417d33633a3979d996015e52e4ff6c7a88e93e5 by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-33537: Add an __all__ to importlib.resources (GH-6920) (#6941)

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Honestly, I don't think there's a strong argument for a CLI option. I'm perfectly happy with just an environment variable. -- ___ Python tracker

[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +6611 stage: -> patch review ___ Python tracker ___

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 17/05/2018 à 18:20, Nick Coghlan a écrit : > > The question is whether we might be able to avoid some > bytes->Python-objects->bytes cycles if there were a few more > contiguous-binary-data-centric operations on bytes and/or memoryview

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the link Serhiy (I'd forgotten about the struct changes proposed in PEP 3118), but the existing struct formatting codes are fine for my purposes. The question is whether we might be able to avoid some bytes->Python-objects->bytes

[issue33560] tuple.index() could return a more explicit error message

2018-05-17 Thread Cyril Roelandt
New submission from Cyril Roelandt : The tuple.index() method returns an error message that does not allow users to know what element was being looked for inside the tuple: >>> ().index(1) Traceback (most recent call last): File "", line 1, in ValueError:

RE: Request for comments: use-cases for delayed evaluation

2018-05-17 Thread Dan Strohl via Python-list
I could easily see using all of the examples; I run into this pretty regularly. What about something like the following (which, honestly is really a combination of other examples). If I have a function that has multiple parameters, each of which might be expensive, but it might break out

  1   2   3   >