[issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir()

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d4d79bc1ff91b04625c312f0219c89aabcd19ce4 by Serhiy Storchaka in branch 'master': bpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)

Re: replacing `else` with `then` in `for` and `try`

2017-11-04 Thread Jon Ribbens
On 2017-11-04, Michael Torrie wrote: > On 11/03/2017 09:06 PM, Chris Angelico wrote: >> On Sat, Nov 4, 2017 at 1:57 PM, Michael Torrie wrote: >>> On 11/03/2017 07:09 PM, Steve D'Aprano wrote: That's incorrect. There are multiple ways to exit a loop that

[issue31415] Add -X option to show import time

2017-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: One benefit (or drawback, depending on how you see it) of the -X option is that it wouldn't propagate to child processes spawned by multiprocessing. See _args_from_interpreter_flags() in Lib/subprocess.py. More generally, the idea that we

[issue31939] Support return annotation in signature for Argument Clinic

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Argument Clinic doesn't have any relations to annotations. It is just by accident use the syntax similar to the syntax of annotations in its declarations (and actually use Python parser for parsing them as anotations, but this

[issue31678] Incorrect C Function name for timedelta

2017-11-04 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.7 ___ Python tracker

[issue31678] Incorrect C Function name for timedelta

2017-11-04 Thread Berker Peksag
Berker Peksag added the comment: New changeset f9387469e82eccb6e0471037033f921be7f59909 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869)

[issue30806] netrc.__repr__() is broken for writing to file

2017-11-04 Thread Steven Loria
Change by Steven Loria : -- pull_requests: +4237 ___ Python tracker ___ ___

[issue31939] Support return annotation in signature for Argument Clinic

2017-11-04 Thread Tal Einat
Tal Einat added the comment: I'm not sure that the current concept of return converters in AC is can be used for specifying return value annotations. For example, what if I want to annotate the return value type with using a return converter? Another example: The current

Re: replacing `else` with `then` in `for` and `try`

2017-11-04 Thread Chris Angelico
On Sat, Nov 4, 2017 at 11:22 PM, Jon Ribbens wrote: > On 2017-11-04, Michael Torrie wrote: >> On 11/03/2017 09:06 PM, Chris Angelico wrote: >>> On Sat, Nov 4, 2017 at 1:57 PM, Michael Torrie wrote: On 11/03/2017 07:09 PM,

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-04 Thread Jon Ribbens
On 2017-11-04, Ben Finney wrote: > To respond to the criticism of an idea – criticism containing no mention > of the person – as though it “clearly refers to the [person]”, is of > significant concern on a software dicussion forum such as this. No, the thing that is

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-04 Thread Chris Angelico
On Sat, Nov 4, 2017 at 11:25 PM, Jon Ribbens wrote: > On 2017-11-04, Ben Finney wrote: >> To respond to the criticism of an idea – criticism containing no mention >> of the person – as though it “clearly refers to the [person]”, is of >>

[issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir()

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31415] Add -X option to show import time

2017-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: (and Terry is right that environment variables can be significantly more annoying on Windows) -- ___ Python tracker

[issue31678] Incorrect C Function name for timedelta

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4236 ___ Python tracker ___

[issue31678] Incorrect C Function name for timedelta

2017-11-04 Thread Berker Peksag
Berker Peksag added the comment: New changeset 82cd3cede804ca694fb0657fd985d5eff84a414f by Berker Peksag (Phobosmir) in branch 'master': bpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869)

[issue31668] "fixFirefoxAnchorBug" function in doctools.js causes navigating problem in Py3 doc in Chrome

2017-11-04 Thread Berker Peksag
Berker Peksag added the comment: This is indeed an annoying bug. Turns out there is already a compatibility shim for $.browser in doctools.js: https://github.com/sphinx-doc/sphinx/commit/c608af4babe140626877be08535af095ff633c00 I've opened

Re: matplot plot hangs

2017-11-04 Thread Andrew Z
Tim, it won't even advance to that line. On Thu, Nov 2, 2017 at 8:28 AM, Tim Williams wrote: > On Wednesday, November 1, 2017 at 6:30:27 PM UTC-4, Andrew Z wrote: > > nope. it doesnt: > > > > I added print-s after each line and that produced: > > [az@hp src]$ cat ./main1.py >

Re: Try: Except: evaluates to True every time

2017-11-04 Thread Karsten Hilbert
On Sat, Nov 04, 2017 at 05:07:26PM +0100, Karsten Hilbert wrote: > Try in an interactive interpreter: > >python> "a string" is True Or, rather, python> if 'a string': print 'success' Sorry, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537

Re: right list for SIGABRT python binary question ?

2017-11-04 Thread Karsten Hilbert
On Fri, Nov 03, 2017 at 07:31:56AM +0100, dieter wrote: > > I have posted backtraces taken from the address being > > watched. Does that help any at all ? > > Only in the case that the error is "local", i.e. detected > (quite) immediately. > > You might be in this case as you have observed that

[issue31415] Add -X option to show import time

2017-11-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Okay, given the non-propagation and Windows issues. I'm -1 on removing -X, +1 on fixing the negative cache. -- ___ Python tracker

[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-11-04 Thread Nitish
Change by Nitish : -- keywords: +patch pull_requests: +4239 stage: needs patch -> patch review ___ Python tracker ___

Aw: Try: Except: evaluates to True every time

2017-11-04 Thread Karsten Hilbert
Try in an interactive interpreter: python> "a string" is True Karsten > Gesendet: Samstag, 04. November 2017 um 16:31 Uhr > Von: "brandon wallace" > An: python-list@python.org > Betreff: Try: Except: evaluates to True every time > > > I have this code that tests a server to

Re: Read Firefox sqlite files with Python

2017-11-04 Thread Peter Otten
Steve D'Aprano wrote: > I'm trying to dump a Firefox IndexDB sqlite file to text using Python 3.5. > > > import sqlite3 > con = sqlite3.connect('foo.sqlite') > with open('dump.sql', 'w') as f: > for line in con.iterdump(): > f.write(line + '\n') > > > The error I get is: > >

[issue31943] Add asyncio.Handle.cancelled() and asyncio.TimerHandle.when

2017-11-04 Thread Marat Sharafutdinov
New submission from Marat Sharafutdinov : It would be handy to access the loop's time the Handle's callback will be called at if you are using delayed calls with "delay" (not "when") argument. Also it is useful to know whether the call was cancelled through the special

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Peter J. Holzer
On 2017-11-04 19:42, Stefan Ram wrote: > What is better: > > ... > import math > ... > ... math.cos ... > ... > > or > > ... > from math import cos > ... > ... cos ... > ... > > ? > > (To me, the first is more readable, because at the site > where »math.cos« is

[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-11-04 Thread Nitish
Change by Nitish : -- nosy: +nitishch ___ Python tracker ___ ___

Re: Try: Except: evaluates to True every time

2017-11-04 Thread Chris Angelico
On Sun, Nov 5, 2017 at 2:31 AM, brandon wallace wrote: > > I have this code that tests a server to see if it is listening on port 123 > runs and evaluates to True every time. Even if the server does not exist but > it is not supposed to do that. I am getting no error message at

Read Firefox sqlite files with Python

2017-11-04 Thread Steve D'Aprano
I'm trying to dump a Firefox IndexDB sqlite file to text using Python 3.5. import sqlite3 con = sqlite3.connect('foo.sqlite') with open('dump.sql', 'w') as f: for line in con.iterdump(): f.write(line + '\n') The error I get is: Traceback (most recent call last): File "", line 2,

Re: Try: Except: evaluates to True every time

2017-11-04 Thread Steve D'Aprano
On Sun, 5 Nov 2017 02:31 am, brandon wallace wrote: > > I have this code that tests a server to see if it is listening on port 123 > runs and evaluates to True every time. Even if the server does not exist but > it is not supposed to do that. I am getting no error message at all. What is > going

[issue31939] Support return annotation in signature for Argument Clinic

2017-11-04 Thread STINNER Victor
STINNER Victor added the comment: I am not asking for a full support of return type annotation. Just export what is already supported in AC, export it in the signature. -- ___ Python tracker

Try: Except: evaluates to True every time

2017-11-04 Thread brandon wallace
I have this code that tests a server to see if it is listening on port 123 runs and evaluates to True every time. Even if the server does not exist but it is not supposed to do that. I am getting no error message at all. What is going on with this code?     #!/usr/bin/env python import

[issue31939] Support return annotation in signature for Argument Clinic

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently nothing is supported Argument Clinic. Return converters don't contain information that can be used in return type annotation. -- ___ Python tracker

[issue26467] Add async magic method support to unittest.mock.Mock

2017-11-04 Thread Chi Hsuan Yen
Change by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Bug report (since resolved) that highlighted our general lack of test coverage for the interactions between environment variable based configuration and command line based configuration: https://bugs.python.org/issue31845 This work revealed

[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1b46131ae423f43d45947bb48844cf82f6fd82b8 by Nick Coghlan in branch 'master': bpo-22257: Mention startup refactoring in What's New (GH-4286) https://github.com/python/cpython/commit/1b46131ae423f43d45947bb48844cf82f6fd82b8

[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1b46131ae423f43d45947bb48844cf82f6fd82b8 by Nick Coghlan in branch 'master': bpo-22257: Mention startup refactoring in What's New (GH-4286) https://github.com/python/cpython/commit/1b46131ae423f43d45947bb48844cf82f6fd82b8

[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Cross-linking to the work-in-progress RFE that introduced the error: https://bugs.python.org/issue22257 -- ___ Python tracker

[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-11-04 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +4248 ___ Python tracker ___ ___

[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-11-04 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +4249 ___ Python tracker ___ ___

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Starting to make some progress on an implementation, and it occurs to me that if this approach does work out, it should make Python level trace functions *much* faster. Right now, the call to the Python function in call_trampoline is

Re: Looping on a list in json

2017-11-04 Thread Sayth Renshaw
no doubt tho after playing with this is that enumerate value ends up in the output which is a dictionary. The enumerate has no key which makes it invalid json if dumped. Not massive issue but getting the effect of enumerate without polluting output would be the winner. >runner_lists = {}

Specialization for learning python from university of Michigan school of information

2017-11-04 Thread fatma . fars33
https://youtu.be/eblAxa5iO24. The video is just an introduction for a course on https://studyscienceblog.wordpress.com/2017/10/28/university-of-mitchigan-s-courses -- https://mail.python.org/mailman/listinfo/python-list

Re: Read Firefox sqlite files with Python

2017-11-04 Thread Steve D'Aprano
On Sun, 5 Nov 2017 04:32 am, Steve D'Aprano wrote: > I'm trying to dump a Firefox IndexDB sqlite file to text using Python 3.5. > > > import sqlite3 > con = sqlite3.connect('foo.sqlite') > with open('dump.sql', 'w') as f: > for line in con.iterdump(): > f.write(line + '\n') Never

Zen of Python “obvious way to do it” (was: [TSBOAPOOOWTDI]using names from modules)

2017-11-04 Thread Ben Finney
Steve D'Aprano writes: > On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: > > > What is the one way to do it? > > There is no philosophy of "one way to do it" in Python, that is a > misunderstanding (possibly deliberate...) spread about by Perl users, > to contrast

Re: replacing `else` with `then` in `for` and `try`

2017-11-04 Thread Steve D'Aprano
On Sat, 4 Nov 2017 04:44 am, Jon Ribbens wrote: > On 2017-11-03, Steve D'Aprano wrote: >> The for loop does not necessarily perform a search: >> >> count = 1 >> for obj in sequence: >> if count > MAX_OBJECTS: >> print("too many objects, halting") >>

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___

[issue28340] [py2] TextIOWrapper.tell extremely slow

2017-11-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Anyone here capable of reviewing the PR? -- nosy: +Mariatta stage: -> patch review ___ Python tracker

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ee1a9a2b78d5b6bb1a8148fc5fcf365e6d4e9e67 by Serhiy Storchaka in branch 'master': bpo-9678: Fix determining the MAC address in the uuid module. (#4264)

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4232 ___ Python tracker ___

[issue28340] [py2] TextIOWrapper.tell extremely slow

2017-11-04 Thread Berker Peksag
Berker Peksag added the comment: >From the original report: > This problem did not exist in version 2.7.1 [...] We usually don't treat performance improvements as bug fixes unless it was introduced in a bug fix release (or it needs to be explicitly approved by the

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4234 ___ Python tracker ___

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ec2b2dcdd664d35753e471429872b2d6ff74a644 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4269)

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4233 ___ Python tracker ___ ___

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b838cc3ff4e039af949c6a19bd896e98e944dcbe by Serhiy Storchaka (Chillar Anand) in branch 'master': bpo-18699: Corrected documentation for window.chgat in curses module (#1430)

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f72ad2d363311b8b0f79aba5236094f9d74d1b2a by Serhiy Storchaka in branch '2.7': [2.7] bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4270)

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6dbecd2cd9c9448b34e1a632509220f3c4cf7587 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430) (#4271)

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4235 ___ Python tracker ___ ___

[issue31937] Add the term "dunder" to the glossary

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it shouldn't be added as a separate entry, but just mentioned in [1] and [2], and added to the index. [1] https://docs.python.org/3/glossary.html#term-special-method [2]

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fd38819497fd2a52ada674f0c890f5b414d0e87f by Serhiy Storchaka in branch '2.7': [2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)

[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.5 ___ Python tracker

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wrong issue number. All this is related to issue18669 -- ___ Python tracker ___

[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b838cc3ff4e039af949c6a19bd896e98e944dcbe by Serhiy Storchaka (Chillar Anand) in branch 'master': bpo-18699: Corrected documentation for window.chgat in curses module (#1430)

[issue21457] NetBSD curses support improvements

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I see, the curses library takes a large progress. On NetBSD 8 just two previously tests should be fixed (issue31924). Many previously skipped tests are passed now. -- resolution: -> out of date stage: -> resolved

[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix curses module compilation with ncurses6 ___ Python tracker

Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-04 Thread Ben Finney
Ian Kelly writes: > Steve was clearly referring to the coder, not the code. Not at all. Steve was referring specifically to the *idea*: [A ‘for … else’ structure without a ‘break’] should absolutely not be a syntax error. There's no reason for it to be a syntax

[issue31887] docs for email.generator are missing a comment on special multipart/signed handling

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4231 stage: -> patch review ___ Python tracker ___

[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-11-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Parameters start and stop were added to the Sequence.index() mixin method in 3.5 (see issue23086). But not all concrete implementations of the Sequence ABC support them (for example range.index() doesn't, see issue28197). This

[issue28197] Add start and stop parameters to the range.index() ABC method

2017-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened issue31942 for the documenting part. -- ___ Python tracker ___

[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Devin Jeanpierre ___ Python tracker ___

[issue28197] Add start and stop parameters to the range.index() ABC method

2017-11-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core -Documentation, Library (Lib) keywords: +easy (C) title: range.index mismatch with documentation -> Add start and stop parameters to the range.index() ABC method

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-11-04 Thread Berker Peksag
Change by Berker Peksag : -- stage: needs patch -> backport needed ___ Python tracker ___

[issue30406] async and await should be keywords in 3.7

2017-11-04 Thread Pierre Quentel
Pierre Quentel added the comment: According to PEP 492, async and await should have been deprecated in 3.5 and 3.6, but I don't think they have been : await = 1 def f(async=True): ... don't raise any deprecation warning in 3.6. Since version 3.7 will break

[issue31604] unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test cases with the expectedFailure decorator

2017-11-04 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-04 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 63ff4131af86e8a48cbedb9fbba95bd65ca90061 by Antoine Pitrou in branch 'master': bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor (#4241)

[issue28340] [py2] TextIOWrapper.tell extremely slow

2017-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The original patch is quite delicate and I'm not comfortable backporting to 2.7. This is why it was pushed to 3.3 but not backported to 3.2.x (AFAIR). 2.7 has existed with this issue for years, now, and is slowly nearing end-of-life. I'll

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Stuart Berg
Change by Stuart Berg : -- pull_requests: +4245 ___ Python tracker ___ ___

[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-04 Thread Hugh Fisher
Hugh Fisher added the comment: The registry key is not totally reliable for finding the compiler. What I did: my system is Windows 8.1 64 bit with Python 2.7 64 bit installed. I'd been testing a setup.py on Linux, time to try on MSWin. So I downloaded VCForPython27.msi

[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-11-04 Thread Steve Dower
Steve Dower added the comment: New changeset aed08562220974b5c67371b908f23caa1be07e38 by Steve Dower in branch 'master': bpo-31609: Fixes quotes in PCbuild/clean.bat (#4280) https://github.com/python/cpython/commit/aed08562220974b5c67371b908f23caa1be07e38 --

[issue31944] Windows Apps and Features items only have "Uninstall"

2017-11-04 Thread Steve Dower
Steve Dower added the comment: New changeset 0d2a9088d16826343344b04461c8be44b4008710 by Steve Dower in branch 'master': bpo-31944: Fixes build and Modify button (#4278) https://github.com/python/cpython/commit/0d2a9088d16826343344b04461c8be44b4008710 --

[issue31944] Windows Apps and Features items only have "Uninstall"

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4246 ___ Python tracker ___

[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-11-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4247 ___ Python tracker ___

[issue31944] Windows Apps and Features items only have "Uninstall"

2017-11-04 Thread Steve Dower
Steve Dower added the comment: New changeset 40708cc7d2361518a2784afedf495eafcc099de5 by Steve Dower (Miss Islington (bot)) in branch '3.6': bpo-31944: Fixes build and Modify button (GH-4278) (#4284)

Re: Looping on a list in json

2017-11-04 Thread Sayth Renshaw
On Sunday, 5 November 2017 09:53:37 UTC+11, Cameron Simpson wrote: > >I want to get a result from a largish json api. One section of the json > >structure returns lists of data. I am wanting to get each resulting list > >returned. > > > >This is my code. > >import json > >from pprint import

Re: Read Firefox sqlite files with Python

2017-11-04 Thread Sayth Renshaw
On Sunday, 5 November 2017 04:32:26 UTC+11, Steve D'Aprano wrote: > I'm trying to dump a Firefox IndexDB sqlite file to text using Python 3.5. > > > import sqlite3 > con = sqlite3.connect('foo.sqlite') > with open('dump.sql', 'w') as f: > for line in con.iterdump(): > f.write(line +

[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-11-04 Thread Steve Dower
Steve Dower added the comment: New changeset f4443562345130c991fded3dc3b02b94aee0f362 by Steve Dower (Miss Islington (bot)) in branch '3.6': bpo-31609: Fixes quotes in PCbuild/clean.bat (GH-4280) (#4285)

[issue31944] Windows Apps and Features items only have "Uninstall"

2017-11-04 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: Ideas about how software should behave

2017-11-04 Thread Ben Finney
Jon Ribbens writes: > On 2017-11-04, Ben Finney wrote: > > To respond to the criticism of an idea – criticism containing no > > mention of the person – as though it “clearly refers to the > > [person]”, is of significant concern on a

[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-11-04 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: Aw: Try: Except: evaluates to True every time

2017-11-04 Thread Steve D'Aprano
On Sun, 5 Nov 2017 03:07 am, Karsten Hilbert wrote: > Try in an interactive interpreter: > >python> "a string" is True Did you try that yourself? -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. --

Re: Looping on a list in json

2017-11-04 Thread Sayth Renshaw
> I'd just keep the interesting runners, along with their race numbers, in a > dict. The enumerate function is handy here. Something like (untested): > > runner_lists = {} > for n, item in enumerate(result): > if this one is interested/not-filtered: > runner_lists[n] =

Re: Looping on a list in json

2017-11-04 Thread Sayth Renshaw
Sorry figured it. Needed to use n to iterate when creating. runner_lists = {} for n, item in enumerate(result): # if this one is interested / not -filtered: print(n, item) runner_lists[n] = result[n]["RacingFormGuide"]["Event"]["Runners"] Sayth --

Re: Looping on a list in json

2017-11-04 Thread Cameron Simpson
On 04Nov2017 17:43, Sayth Renshaw wrote: figured it. Needed to use n to iterate when creating. Yeah, my mistake. runner_lists = {} for n, item in enumerate(result): # if this one is interested / not -filtered: print(n, item) runner_lists[n] =

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Terry Reedy
On 11/4/2017 3:42 PM, Stefan Ram wrote: What is better: ... import math ... ... math.cos ... ... or ... from math import cos ... ... cos ... ... ? (To me, the first is more readable, because at the site where »math.cos« is used, it is made clear that »cos« comes from math.

Re: python3 byte decode

2017-11-04 Thread Cameron Simpson
On 04Nov2017 01:47, Chris Angelico wrote: On Fri, Nov 3, 2017 at 8:24 PM, Ali Rıza KELEŞ wrote: Yesterday, while working with redis, i encountered a strange case. I want to ask why is the following `True` ``` "s" is b"s".decode() ``` while the

Re: [TSBOAPOOOWTDI]using names from modules

2017-11-04 Thread Steve D'Aprano
On Sun, 5 Nov 2017 06:42 am, Stefan Ram wrote: > What is the one way to do it? There is no philosophy of "one way to do it" in Python, that is a misunderstanding (possibly deliberate...) spread about by Perl users, to contrast Python from Perl's "more than one way to do it". The Zen of Python

Looping on a list in json

2017-11-04 Thread Sayth Renshaw
Hi I want to get a result from a largish json api. One section of the json structure returns lists of data. I am wanting to get each resulting list returned. This is my code. import json from pprint import pprint with open(r'/home/sayth/Projects/results/Canterbury_2017-01-20.json', 'rb') as

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-11-04 Thread Steve Dower
Steve Dower added the comment: And yes, I think this is fine for 3.6. -- ___ Python tracker ___

  1   2   >