[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think a new public API should be introduced. This is at best an implementation detail. Also, I really don't want to garbage-up the inner-loop code for the itertools. I've spent a good deal of time micro-optimizing this code and don't want to

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Jim Lee
On 06/23/2018 10:03 PM, Steven D'Aprano wrote: I'd like to run a quick survey. There is no right or wrong answer, since this is about your EXPECTATIONS, not what Python actually does. Given this function: def test(): a = 1 b = 2 result = [value for key, value in

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Vinay Sajip
Vinay Sajip added the comment: OK, let's go with "force", then. There are plenty of other places in Python where it's used, so there's that: https://github.com/python/cpython/search?l=Python=force -- ___ Python tracker

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: The purpose would be two-fold: 1. The presence of the `check_signals()` wrapper provides a way to more explicitly document that the other itertools iterators *don't* implicitly check for signals, so if you want to combine them with consumers that also don't

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Steven D'Aprano
On Sun, 24 Jun 2018 15:18:49 +1000, Chris Angelico wrote: > Personally, I think it should give you [1, 2], the two values from the > function's locals. Thank you, that's the sort of answer I'm looking for. (I'm not saying I didn't read your long and involved analysis, only that I'm not looking

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Chris Angelico
On Sun, Jun 24, 2018 at 3:03 PM, Steven D'Aprano wrote: > I'd like to run a quick survey. There is no right or wrong answer, since > this is about your EXPECTATIONS, not what Python actually does. > > Given this function: > > > def test(): > a = 1 > b = 2 > result = [value for key,

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What if itertools were to offer an opt-in ... This doesn't make sense to me. As far as I can tell, the only time this issue has ever arisen in the past 15 or 16 years is when someone was trying to create an unbreakable infinite loop on-purpose. In a

Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Steven D'Aprano
I'd like to run a quick survey. There is no right or wrong answer, since this is about your EXPECTATIONS, not what Python actually does. Given this function: def test(): a = 1 b = 2 result = [value for key, value in locals().items()] return result what would you expect the

[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about the generator-iterator case a bit more, "False" would be a bad default for that. Allowing "NotImplemented" to indicate the ambiguous "Might be finite, might be infinite" state, and using that as the default for generator-iterators, would

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: As a potential stepping stone towards possible future changes in the default behaviour here, what if itertools were to offer an opt-in "check_signals(itr, *, iterations=100_000)" helper function that was essentially a more efficient version of:: def

[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: (I've updated the issue title to state the design requirement, rather than one potential solution to the design requirement) I like the declarative `__infinite_iterator__` suggestion, as that's: 1. really easy to implement when defining a custom iterator type

Re: translating foreign data

2018-06-23 Thread Chris Angelico
On Sun, Jun 24, 2018 at 1:23 PM, Steven D'Aprano wrote: > On Sun, 24 Jun 2018 12:53:49 +1000, Chris Angelico wrote: > > [...] >>> Okay, you want a bit-pattern. In hex: >>> >>> '0x313030e282ac' > [...] > >> Hmm. Actually, I'm a bit confused. >> > hex("100€".encode()) >> Traceback (most recent

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 56aaef0ddba6275b8043b58433739a64497f33b4 by Miss Islington (bot) in branch '3.7': bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884) https://github.com/python/cpython/commit/56aaef0ddba6275b8043b58433739a64497f33b4

[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: This statement is no longer correct: "when python starts, it runs using the C locale, on any platform (Windows, Linux, BSD), any python version (2, 3...), until locale.setlocale() is used to set another locale." The Python 3 text model doesn't work properly

Re: translating foreign data

2018-06-23 Thread Steven D'Aprano
On Sun, 24 Jun 2018 12:53:49 +1000, Chris Angelico wrote: [...] >> Okay, you want a bit-pattern. In hex: >> >> '0x313030e282ac' [...] > Hmm. Actually, I'm a bit confused. > hex("100€".encode()) > Traceback (most recent call last): > File "", line 1, in > TypeError: 'bytes' object cannot

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 18:29:51 +0100, MRAB wrote: > You can already do something similar like this: > > def f(): > f.x += 1 > return f.x > f.x = 0 > > [snip] You can, but only as an illustration, not as a serious implementation. The whole point of static local variables is that they

[issue33919] Expose _PyCoreConfig structure to Python

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Back on the original hash seed topic: 1. The exact size of the seed ranges from 128 bits (SIPHash) to 32-bits depending on exactly which hash algorithm you're talking about (https://www.python.org/dev/peps/pep-0456/#hash-secret) 2. While PEP 456 doesn't

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7497 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7496 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33451] Start pyc file lock the file

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset ea737751b10fff752aafed0231e8a02b82ba365d by Nick Coghlan (Zackery Spytz) in branch 'master': bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884) https://github.com/python/cpython/commit/ea737751b10fff752aafed0231e8a02b82ba365d

[issue33919] Expose _PyCoreConfig structure to Python

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: I'm thoroughly open to co-author requests for PEP 432 - the "Let's implement it as a private API for Python 3.7 and see what we learn from the experience" plan worked beautifully, but it *also* means the PEP text is now woefully out of date with reality :)

Re: translating foreign data

2018-06-23 Thread Chris Angelico
On Sun, Jun 24, 2018 at 12:44 PM, Steven D'Aprano wrote: > You're joking, right? You can't possibly be so ignorant as to actually > believe that. You have, right in front of you, a news post or email > containing the text string "100€", and yet you are writing apparently in > full seriousness

Re: translating foreign data

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 17:52:55 -0400, Richard Damon wrote: > If you have more than just a number representing a value in the locale > currency, you can't ask the locale how to present/accept it. You're the only one saying that it has to be handled by the locale. -- Steven D'Aprano "Ever since I

Re: translating foreign data

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 17:05:17 -0400, Richard Damon wrote: > On 6/23/18 11:27 AM, Steven D'Aprano wrote: >> On Sat, 23 Jun 2018 09:42:29 -0400, Richard Damon wrote: >> >>> On 6/23/18 9:05 AM, Marko Rauhamaa wrote: Ok. Here's a value for you: 100€ [...] > Locale based currency

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Steven D'Aprano
On Sun, 24 Jun 2018 00:37:36 +0100, Bart wrote: > Do you mean that if the same 'def' block is re-executed, it will create > a different instance of the function? (Same byte-code, but a different > set of everything else the function uses.) That's not as slow as you think it is. Everything that

Re: syntax difference

2018-06-23 Thread Gregory Ewing
Bart wrote: But 40 years ago it was just 'readln a,b,c'; it was just taken for granted. The problem with something like that is that it's really only useful for throwaway code. For any serious application, you need to deal with the possibility of malformed input, producing helpful diagnostics,

Re: syntax difference

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 23:26:43 +0100, Bart wrote: > Then [40 years ago], the easy part was reading the three numbers. Now > that would be the more challenging part. # Get three numbers, separated by spaces, with no error-recovery. # If you try to read bad data, the process will fail. n1, n2, n3 =

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: The bots occasionally miss. PR 7885 was indeed merged even though the message has not appeared. https://github.com/python/cpython/commit/2c11e23a5a686edc69bcbb4c65f500d50d992bb3 PR 7886 was merged as the message says, even though the status was not changed.

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 21:44:00 +0100, Bart wrote: > Since these references are created via the return g statement here: > > def f(): > def g(): > > return g > > (say to create function references i and j like this: > > i = f() > j = f() > ) > >

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 0ba9a0b7d19da8b4bd3c13b358d3fd2a5ad16f09 by Senthil Kumaran (Andrés Delfino) in branch 'master': [master] bpo-33885: Replace "hook function" with "callable" (GH-7765) (#7886)

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +7495 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Gregory Ewing
Bart wrote: Wow. (Just think of all the times you write a function containing a neat bunch of local functions, every time it's called it has to create a new function instances for each of those functions, even if they are not used.) Fortunately, function objects are small and cheap,

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +7494 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33944] Deprecate and remove pth files

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Brett pointed out that may initial reaction above came across as quite blunt and demanding, so attempting to phrase that more clearly as a user experience consideration: It may be tempting to view this as purely a clean-up of the import system

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Mikhail
Mikhail added the comment: This file was taken from https://docs.python.org/3.7/archives/python-3.7.0rc1-docs-pdf-a4.zip Hashes CRC32: 327CF408 MD5: 7EBEB565C1EA7E52F366B5C734500FAC SHA-1: 09727C07C45965E4E43664B727E7CAECC4F3CD89 SHA-256:

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Ben Bacarisse
Bart writes: > On 23/06/2018 23:25, Ben Bacarisse wrote: >> Bart writes: >> >>> On 23/06/2018 21:13, Chris Angelico wrote: On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: >>> > (At what point would that happen anyway; if you do this: >>> NONE of your examples are taking copies of

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not sure what the best word would be (freshen, update, reconfigure, reset, and restart all communicate the intent). I can't think of a simple word that accurately describes the implementation which removes and closes all root handlers. --

Re: syntax difference

2018-06-23 Thread boB Stepp
On Sat, Jun 23, 2018 at 5:35 PM Bart wrote: > > On 23/06/2018 20:52, boB Stepp wrote: > The first programming exercise I ever did involved asking for three > numbers, then determining whether those numbers could form the sides of > a triangle. > > Then [40 years ago], the easy part was reading

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Chris Angelico
On Sun, Jun 24, 2018 at 9:37 AM, Bart wrote: > On 23/06/2018 23:25, Ben Bacarisse wrote: >> >> Bart writes: >> >>> On 23/06/2018 21:13, Chris Angelico wrote: On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: >>> >>> > (At what point would that happen anyway; if you do this: >>> >>>

[issue33851] 3.7 regression: ast.get_docstring() for a node that lacks a docstring

2018-06-23 Thread Ned Deily
Ned Deily added the comment: @mgedmin, Just to be certain, are you able to verify that the change in PR 7701 fixes the problem you see with 3.7.0rc1? -- ___ Python tracker

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Bart
On 23/06/2018 23:25, Ben Bacarisse wrote: Bart writes: On 23/06/2018 21:13, Chris Angelico wrote: On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: (At what point would that happen anyway; if you do this: NONE of your examples are taking copies of the function. They all are making

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Ned Deily
Change by Ned Deily : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Vinay Sajip
Vinay Sajip added the comment: > Perhaps "clear_handlers" or "replace_handlers" would be more self-descriptive. Except that it doesn't *just* clear the handlers - the act of clearing also lets e.g. the level to be set and the formatting to be set by the call. --

Re: syntax difference

2018-06-23 Thread Bart
On 23/06/2018 20:52, boB Stepp wrote: I've finally found time to examine this rather long, rambling thread. There is a place for various levels of programming language. I'm saying that Python which is always touted as a 'simple' language suitable for beginners, is missing a surprising

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Ben Bacarisse
Bart writes: > On 23/06/2018 21:13, Chris Angelico wrote: >> On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: > >>> (At what point would that happen anyway; if you do this: > >> NONE of your examples are taking copies of the function. They all are >> making REFERENCES to the same function. That is

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

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

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 7729d6d27d5d31b9764dec4a96a458015be3ecb8 by Miss Islington (bot) in branch '3.6': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/7729d6d27d5d31b9764dec4a96a458015be3ecb8 --

Re: translating foreign data

2018-06-23 Thread Richard Damon
On 6/23/18 5:31 PM, Ben Finney wrote: > Richard Damon writes: > >> On 6/23/18 11:27 AM, Steven D'Aprano wrote: On 6/23/18 9:05 AM, Marko Rauhamaa wrote: > Richard Damon wrote: >> Data presented to the user should normally use his locale >> (unless he has specified something

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 6b7ed31cf9d89a5ffcb3ab438dfd4760b781c488 by Miss Islington (bot) in branch '3.7': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/6b7ed31cf9d89a5ffcb3ab438dfd4760b781c488 --

[issue33451] Start pyc file lock the file

2018-06-23 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +7493 stage: -> patch review ___ Python tracker ___ ___

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7492 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7491 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list

Re: translating foreign data

2018-06-23 Thread Ben Finney
Richard Damon writes: > On 6/23/18 11:27 AM, Steven D'Aprano wrote: > >> On 6/23/18 9:05 AM, Marko Rauhamaa wrote: > >>> Richard Damon wrote: > >>> > Data presented to the user should normally use his locale > >>> > (unless he has specified something different). > >>> > >>> Ok. Here's a value

[issue30618] readlink for pathlib paths

2018-06-23 Thread girts
girts added the comment: Just ran into the same thing. I would be interested in adding support for a "readlink" call if a pull request on this would be welcome. -- nosy: +girts ___ Python tracker

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5ae70f66ff1949eec35ff207c97cfe572c4e74c8 by Terry Jan Reedy in branch 'master': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/5ae70f66ff1949eec35ff207c97cfe572c4e74c8 --

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should have been done when the replacement was made. No news needed. -- stage: patch review -> commit review title: IDLE htest: don't try to test deleted tabbedpages.py -> IDLE htest: remove spec for deleted tabbedpages.py

[issue33950] IDLE htest: don't try to test deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +7490 stage: commit review -> patch review ___ Python tracker ___ ___

[issue33950] IDLE htest: don't try to test deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
New submission from Terry J. Reedy : About last September, idlelib.tabbedpages was replaced in configdialog by ttk.notebook and deleted. Delete the testing spec, which causes htest to fail when attempting to run all htests. -- messages: 320332 nosy: terry.reedy priority: normal

Re: translating foreign data

2018-06-23 Thread Richard Damon
On 6/23/18 11:27 AM, Steven D'Aprano wrote: > On Sat, 23 Jun 2018 09:42:29 -0400, Richard Damon wrote: > >> On 6/23/18 9:05 AM, Marko Rauhamaa wrote: >>> Ok. Here's a value for you: >>> >>> 100€ >>> >>> I see '1', '0', '0', '€'. What do you see in your locale (LC_MONETARY)? >> If I processed

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Bart
On 23/06/2018 21:13, Chris Angelico wrote: On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: (At what point would that happen anyway; if you do this: NONE of your examples are taking copies of the function. They all are making REFERENCES to the same function. That is all. This is about your

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Chris Angelico
On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: > This is an example of a simple concept getting so out of hand that it will > either never be implemented, or the resulting implementation becomes > impractical to use. > > This is what we're trying to do: > > def nextx(): > static x = 0

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Raymond. I'm working on a patch. -- versions: +Python 3.8 ___ Python tracker ___ ___

[issue33933] Error message says dict has no len

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: This probably doesn't warrant another tracker entry. Serhiy already had a PR for this and attached it to the original bug report for https://bugs.python.org/issue32500 . See https://github.com/python/cpython/pull/7846 My suggestion would be to just

Re: syntax difference

2018-06-23 Thread boB Stepp
I've finally found time to examine this rather long, rambling thread. On Wed, Jun 20, 2018 at 5:46 AM wrote: > > Yeah, people keep bringing that up when they run out of arguments. > > So, every programmer must always use the most advanced, most esoteric > features possible at every opportunity?

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Maybe we should include a test that checks that if you provide an invalid file the file descriptors are not leaked (it can be in a different PR, maybe). -- ___ Python tracker

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: @Rémi can you include a NEWS entry? Also, indicate that your patch prevents a file descriptor to be leaked in the cases indicated in my last message. -- ___ Python tracker

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The current status of json.tool also leaks a file descriptor if you use the same filename or an invalid one (needs debug build to receive this error message): $ ./python -m json.tool invalid_file.dat nofile.dat Expecting value: line 1 column 1 (char

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: We have a tool designed for this problem. See: https://docs.python.org/3/library/reprlib.html#reprlib.recursive_repr If you want to avoid a dependency, it is easy to inline the logic. For an example, see the Python 2.7 version of

[issue33949] tests: allow to select tests using loadTestsFromName

2018-06-23 Thread daniel hahler
New submission from daniel hahler : I was not aware of `python -m test -m …`, but think that supporting `python -m test test.module.class.name` should be supported for selecting a single test. -- components: Tests messages: 320325 nosy: blueyed priority: normal pull_requests: 7489

[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ditto with fresh update and build, except that I used installed 3.7.0rc1 (and it passed). This is not regularly failing on the (Windows) buildbots, so there is something 'different' about the repository on some non-buildbot user machines. I am pretty sure

[issue33939] Raise OverflowError in __length_hint__ for consistently infinite iterators

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps an object can set an attribute, __infinite_iterator__ = True. That would provide an unequivocal way to communicate to consumer code that the producer is known to generate a non-terminating stream. --

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This seems like a difficult problem to tackle in all cases, if two dataclasses reference each other the cycle could be complex to identify and introduce complexity. The way repr is defined is part of PEP 557 and actually force this behavior. Should the `repr`

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Raymond, what do you think about "force" from a pedagogical > point of view? "force" is also good. Perhaps "clear_handlers" or "replace_handlers" would be more self-descriptive. -- ___ Python tracker

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset a845b7ab3e8ba1c20ef4c3ee23ebf50df7e7c4c6 by Miss Islington (bot) in branch '3.6': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/a845b7ab3e8ba1c20ef4c3ee23ebf50df7e7c4c6 --

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 070c91e46579429f7af7599af6d9e67a8dc5be50 by Miss Islington (bot) in branch '3.7': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/070c91e46579429f7af7599af6d9e67a8dc5be50 --

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 3e3157bd55f197ab36b280b26aea8dcd04e37fcf by Miss Islington (bot) in branch '2.7': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/3e3157bd55f197ab36b280b26aea8dcd04e37fcf -- nosy:

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Ned Deily
Ned Deily added the comment: Can you say from which URL you downloaded the PDF (assuming you didn't build it yourself)? -- nosy: +ned.deily ___ Python tracker ___

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-23 Thread Ned Deily
Ned Deily added the comment: Thanks for the more detailed explanation. I think you are right that the behavior does not match the documentation but which is to be preferred does not necessarily have an easy answer. Also, this whole area has been undergoing revision, for example, with new

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7488 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7487 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7486 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 38cf49bf695903ac7a8516bca6bbb6b32d935bb5 by Mariatta (Andrés Delfino) in branch 'master': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/38cf49bf695903ac7a8516bca6bbb6b32d935bb5 -- nosy:

Re: translating foreign data

2018-06-23 Thread Peter J. Holzer
On 2018-06-23 12:41:33 -0400, Richard Damon wrote: > On 6/23/18 11:44 AM, Steven D'Aprano wrote: > > You're assuming that there will be a misinterpretation. That's an absurd > > assumption to make. There might be, of course, but the documentation for > > my document might be clear that comma is

Re: translating foreign data

2018-06-23 Thread Peter J. Holzer
On 2018-06-23 12:11:34 -0400, Richard Damon wrote: > On 6/23/18 10:05 AM, Peter J. Holzer wrote: > > On 2018-06-23 08:41:38 -0400, Richard Damon wrote: > >> Once you open the Locale can of worms, EVERYTHING has a locale, to say > >> you aren't using a locale is to say you are writing > >>

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread MRAB
On 2018-06-23 05:16, Chris Angelico wrote: On Sat, Jun 23, 2018 at 1:51 PM, Steven D'Aprano wrote: On Wed, 20 Jun 2018 14:18:19 +1000, Chris Angelico wrote: Ah. Yeah, that would be a plausible feature to add to Python. But in C, a static variable is basically the same thing as a global

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Mikhail
New submission from Mikhail : Hello, Python Team, In reference.pdf I came across truncated lines in Python syntax that are not wrapped and carried forward to the next line, but instead run across the right margin. Examples "2.3 Identifiers and keywords" line contains "id_start ::= "

Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Bart
On 23/06/2018 14:32, Stefan Ram wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: def f(): def g(): g.x += 1 return g.x g.x = 0 return g Or, "for all g to share the same x": main.py def f(): def g(): f.x += 1 return f.x

Re: translating foreign data

2018-06-23 Thread Richard Damon
On 6/23/18 11:44 AM, Steven D'Aprano wrote: > On Sat, 23 Jun 2018 08:12:52 -0400, Richard Damon wrote: > >> On 6/23/18 7:46 AM, Steven D'Aprano wrote: >>> On Sat, 23 Jun 2018 06:26:22 -0400, Richard Damon wrote: >>> If you know the Locale, then you do know what the decimal separator is,

[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar case: text.read(1); text.write(b'x'); text.tell() And there may be crashes after setting self->snapshot to NULL due to the failure of Py_BuildValue(). -- ___ Python tracker

[issue33946] os.symlink on Windows should use the new non-admin flag

2018-06-23 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add non-elevated symlink support for dev mode Windows 10 type: -> enhancement ___ Python tracker

Re: translating foreign data

2018-06-23 Thread Richard Damon
On 6/23/18 10:05 AM, Peter J. Holzer wrote: > On 2018-06-23 08:41:38 -0400, Richard Damon wrote: >> On 6/23/18 8:28 AM, Peter J. Holzer wrote: >>> On 2018-06-23 08:12:52 -0400, Richard Damon wrote: On 6/23/18 7:46 AM, Steven D'Aprano wrote: > If I'm in Australia, using the en-AU locale,

Re: translating foreign data

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 08:12:52 -0400, Richard Damon wrote: > On 6/23/18 7:46 AM, Steven D'Aprano wrote: >> On Sat, 23 Jun 2018 06:26:22 -0400, Richard Damon wrote: >> >>> If you know the Locale, then you do know what the decimal separator >>> is, as that is part of what a locale defines. >> A

Re: translating foreign data

2018-06-23 Thread Steven D'Aprano
On Sat, 23 Jun 2018 09:42:29 -0400, Richard Damon wrote: > On 6/23/18 9:05 AM, Marko Rauhamaa wrote: >> Ok. Here's a value for you: >> >> 100€ >> >> I see '1', '0', '0', '€'. What do you see in your locale (LC_MONETARY)? > > If I processed that on my system I would either get $100, or an

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset bbef7abe922edadc7a1679c19d6053240bf600d5 by Miss Islington (bot) in branch '3.7': bpo-33805: Improve error message of dataclasses.replace() (GH-7580) https://github.com/python/cpython/commit/bbef7abe922edadc7a1679c19d6053240bf600d5 --

[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-23 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +7484 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue33942] IDLE: Problems using IDLE and 2.7, 3.6 macOS 64-/32-bit installer

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Now I see what Ned meant by making 64-bit-only instead of 64-/32-bit the default in 3.6.7. What we directly suggested is https://www.python.org/downloads/release/python-365/, pick 'macOS 64-bit installer', 'for OS X 10.9 and later'. You could also go to

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7483 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: "Data blocks" syntax specification draft

2018-06-23 Thread Abdur-Rahmaan Janhangeer
the tab separated idea is used in : e.g. see last section of files Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > > -- https://mail.python.org/mailman/listinfo/python-list

  1   2   >