[issue40538] struct.calcsize('L')== 8 but 4 is specified in documentation

2020-05-06 Thread Mark Dickinson
New submission from Mark Dickinson : Use `struct.calcsize('L')` if you want the standard sizes and formats given in the documentation. The note at the top of the struct module documentation describes the difference. See also #1709506. -- nosy: +mark.dickinson resolution

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: Some of the things that might go into a PEP, or into the PEP-creation process: - Arguments for: (a) a new imath module, versus (b) new functions in math, versus (c) a 3rd party package on PyPI. - A handful of plausible use-cases. - Comparisons

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-05 Thread Mark Dickinson
Mark Dickinson added the comment: Reopening as requested. Adding a new module to the standard library is a fairly big change. I don't think we can do that through just this issue and PR. I think we're going to need a PEP sooner or later. (In any case, a PEP is standard procedure for a new

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-05 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the relevant part of the dev. guide: https://devguide.python.org/stdlibchanges/#proposal-process The PEP would also need a core dev sponsor. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40455] GCC 10 compiler warnings

2020-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: As to _why_ it's a false positive: at that point in the code, assuming 30-bit limbs and an IEEE 754 binary64 "double", we have (using Python notation for floor division) a_size == 1 + (a_bits - 1) // 30 and shift_digits == (a_bits -

[issue40455] GCC 10 compiler warnings

2020-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: I'm fairly sure that that's a false positive for `longobject.c`. Do you know of a non-intrusive way to silence the warning? -- ___ Python tracker <https://bugs.python.org/issue40

[issue40455] GCC 10 compiler warnings

2020-05-01 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue40455> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-28 Thread Mark Dickinson
Mark Dickinson added the comment: Closing this. Please open a separate issue for changing the complex repr if that's the way that you want to go. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _

[issue40388] random.choice integer overflow v3.5.2

2020-04-25 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug status: open -> pending ___ Python tracker <https://bugs.python.org/issue40388> ___ ___ Python-bugs-

[issue40388] random.choice integer overflow v3.5.2

2020-04-25 Thread Mark Dickinson
Mark Dickinson added the comment: I suspect that the OP is doing something like `random.choice(range(10**40))`: Python 3.8.2 (default, Feb 27 2020, 19:56:42) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: [Tim] > Mark, you don't count ;-) Yes, I was suspecting I'd fail the "real world" test. Fair enough. :-) -- ___ Python tracker <https://bugs.pytho

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: [Victor] > Honestly, if you consider that BaseRandom base class is not worth it, I will > just abandon this idea. It's not that I think it's not worth it (I'm not currently convinced either way). It's more that if we're going to make a change, the

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: > it may be worth looking at the recent Numpy changes Agreed: I do like the NumPy composition model (the random state object _has_ a bit generator, rather than _being_ an extended bit generator). With the various competing options and the lack of agreem

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops. I thought the URL highlighter would be clever enough not to include the period. That URL is: https://github.com/mdickinson/pcgrandom -- ___ Python tracker <https://bugs.python.org/issue40

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: [Tim] > Who subclasses Random in the real world? Who would want to? Um. Me? Or at least, I *wanted* to, when I was playing around with PCG. (See https://github.com/mdickinson/pcgrandom.) But after running into the same inelegancies (please note that

[issue39471] Meaning and clarification of PyBuffer_Release()

2020-04-22 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue39471> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

2020-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: However, the list comprehension pattern is not as bad as lines like this one [#1]: map(lambda plugin: self.start_plugin(plugin), self._plugins) ... which of course stopped working as soon as we transitioned to Python 3. :-( [#1] https://github.com

[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

2020-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: This is an antipattern I've seen on multiple occasions in real code. A common offender is: [worker.join() for worker in workers] Similarly, things like: [plugin.start() for plugin in plugins] I do think it would be worth updating the FAQ text

[issue40354] problem when using yield

2020-04-21 Thread Mark Dickinson
Mark Dickinson added the comment: Which part of the behaviour do you think is a bug? In version1, you want to think of the yield expression as though it were bracketed like this: result = yield (a+100 if b>100 else (yield a)) With the particular values of a and b that you h

[issue40332] RegEx for numbers in documentation (easy fix - solution provided)

2020-04-20 Thread Mark Dickinson
Mark Dickinson added the comment: As you say, isn't this just a personal preference? Is there an objective reason to prefer something that accepts ".5" and rejects "3." over something that rejects ".5" and accepts "3."? The exact form of numbe

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: > I tried to make repr of floats producing a string which rounds up with eval() We've looked at this before. There just isn't any sane and easy way to do this, except for changing the repr to be "complex(real, imag)", which is the solution

[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Mark Dickinson
Mark Dickinson added the comment: This was discussed previously in #37000. I agree that `getrandbits(0)` should succeed. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: Another related issue is #23229, where Guido says (in msg233963): > BTW I don't want repr() of a complex number to use the > complex(..., ...) notation -- it's too verbose. -- ___ Python tracker

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-13 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +18849 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19498 ___ Python tracker <https://bugs.python.org/issu

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: > The Imaginary type could help to solve other "gotchas". Yes, it's an attractive proposition from many angles: e.g., multiplying by 1j could do the correct quarter-turn rotation in the complex plane, keeping all signs correct, so that multiply

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: See also #25839, #22548; there's lot of discussion of the core issue on those tickets. As Serhiy says, the only reasonable "true" fix would be to have 1j be a genuine imaginary literal, but that's a lot of work and potential disruption (not ju

[issue40177] Python Language Reference Documentation

2020-04-05 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report! Now fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior ___ Python tracker <https://bugs.python

[issue40177] Python Language Reference Documentation

2020-04-04 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +18718 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19357 ___ Python tracker <https://bugs.python.org/issu

[issue40117] __round__ doesn't behave well with return NotImplemented

2020-03-31 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed with Eric and Serhiy. This seems to be a misunderstanding about the scope of NotImplemented. @Hameer Abbasi: if you have an example of a problem that would be solved by this behaviour change, and which can't be solved simply by raising TypeError

[issue40117] __round__ doesn't behave well with return NotImplemented

2020-03-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue40117> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33725] Python crashes on macOS after fork with no exec

2020-03-29 Thread Mark Dickinson
Mark Dickinson added the comment: @Mouse: replace the last block of your code with something like this: # Start worker processes workers = [] for m in range(nProcesses): p = mp.Process(target=getElements, args=(q, tSleep / 1000, m)) workers.append(p

[issue33725] Python crashes on macOS after fork with no exec

2020-03-29 Thread Mark Dickinson
Mark Dickinson added the comment: @Mouse: see #28965. The fix for the code you show is to join the child processes before the main process starts exiting. -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue33

[issue40028] Math module method to find prime factors for non-negative int n

2020-03-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue40028> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: Ah yes; looking at the `black` output, there's also an opportunity for an exciting discussion about trailing commas here :-) -- ___ Python tracker <https://bugs.python.org/issue39

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: This feels like something that's very much down to personal preference. I also prefer the closing "]" and ")" characters on their own lines, but I'd be happy with an argument to ast.dump giving me that option. -- n

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: > This example can simply be dropped now. It could be, but it would be better to replace it with a different example that works. Any suggestions? -- ___ Python tracker <https://bugs.python.org/issu

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +18393 pull_request: https://github.com/python/cpython/pull/19042 ___ Python tracker <https://bugs.python.org/issue38

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Mark Dickinson added the comment: Zackery: Thanks for the fix! Now merged and backported to 3.8 and 3.7. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 4dcfe5f2e4bad8e03990de75d8d4ec20e8aa23b3 by Mark Dickinson in branch '3.7': [3.7] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) (GH-18990) https://github.com/python/cpython/commit

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset e634a8ac1f8a2904a2241b83fc5e4c9f40d5c7ca by Mark Dickinson in branch '3.8': [3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) (GH-18989) https://github.com/python/cpython/commit

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +18337 pull_request: https://github.com/python/cpython/pull/18990 ___ Python tracker <https://bugs.python.org/issue39

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +18336 pull_request: https://github.com/python/cpython/pull/18989 ___ Python tracker <https://bugs.python.org/issue39

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 5208b4b37953a406db0ed6a9db545c2948dde989 by Zackery Spytz in branch 'master': bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) https://github.com/python/cpython/commit/5208b4b37953a406db0ed6a9db545c2948dde989

[issue39956] Numeric Literals vs string "1_1" on input int() or float() or literal_eval

2020-03-14 Thread Mark Dickinson
Mark Dickinson added the comment: [Raymond] > I prefer what we have now. The language is consistent [...] Agreed. I don't see value in having two different sets of rules, one for numeric literals and one for explicit str-to-int conversions. And if we *were* to adopt a different

[issue39918] random.Random(False) weird error

2020-03-09 Thread Mark Dickinson
Mark Dickinson added the comment: The lines here look odd to me: https://github.com/python/cpython/blob/363fab83b8a0e6d924c7a7c577feec6a2812bb8c/Modules/_randommodule.c#L290-L291 args[0] = arg; n = PyObject_Vectorcall(_randomstate_global->Long___abs__, args

[issue39905] Cannot load sub package having a 3-dot relative import

2020-03-09 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39905] Cannot load sub package having a 3-dot relative import

2020-03-08 Thread Mark Dickinson
Mark Dickinson added the comment: In this line: > spec = spec_from_file_location("subsubpkg_rel", > "/home/yon/myproj/mypkg/subpkg/subsubpkg_rel/__init__.py") try providing the fully-qualified name, instead of just "subsubpkg_rel". That i

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-06 Thread Mark Dickinson
Mark Dickinson added the comment: No problem; I'll likely pick it up (if no-one else does) in the next few days. -- assignee: -> mark.dickinson ___ Python tracker <https://bugs.python.org/issu

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-05 Thread Mark Dickinson
Mark Dickinson added the comment: @David: do you have any interest in creating a PR? -- ___ Python tracker <https://bugs.python.org/issue39871> ___ ___ Pytho

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-05 Thread Mark Dickinson
Mark Dickinson added the comment: Nice find. This affects not just copysign, but all of the math module functions that use FUNC2 under the hood. (I think that's just "remainder", "atan2" and "copysign".) --

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-05 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue39871> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39867] randrange(N) for N's in same dyadic blocs have excessive correlations when sharing identical seeds

2020-03-05 Thread Mark Dickinson
Mark Dickinson added the comment: These results are hardly surprising, given the algorithms used. But why would you consider this a problem? If you want your randrange(n) and randrange(m) results to be independent, don't generate them from the exact same random source, starting

[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread Mark Dickinson
Mark Dickinson added the comment: Thank you for reviewing! -- ___ Python tracker <https://bugs.python.org/issue39530> ___ ___ Python-bugs-list mailing list Unsub

[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: See also the discussion in #38747 (also opened by Marco), which was closed as rejected. This issue is close to a duplicate of that one. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39820] Bracketed paste mode for REPL

2020-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: Is this even possible in a plain text console (or plain text console + GNU readline-equivalent)? > Bracketed paste mode is implemented in many text editors, as vi. Sure, but the REPL is not a text editor, and knows very little about the context it's be

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: There's a PR on GitHub. (GH-18615) Terry: I think you've looked at similar sorts of documentation clarifications in the past. Would you have any interest in reviewing this one? -- nosy: +terry.reedy ___ Python

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I don't see anything here that would indicate that this is a core Python problem. This looks like something you'd need to take up with the tensorflow folks. (Investigations could conceivably turn up a CPython bug as the underlying cause, in which case

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-23 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +17980 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18615 ___ Python tracker <https://bugs.python.org/issu

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: It looks as though this has been addressed, and can be closed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue5996] abstract class instantiable when subclassing built-in types

2020-02-23 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue5996> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-23 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue39599> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39657] Bezout and Chinese Remainder Theorem in the Standard Library?

2020-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: I'm inclined to close this. Raymond, Tim: thoughts? -- assignee: -> mark.dickinson nosy: +rhettinger, tim.peters ___ Python tracker <https://bugs.python.org/issu

[issue36027] Support negative exponents in pow() where a modulus is specified.

2020-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: For tracker historians: see also #457066 -- ___ Python tracker <https://bugs.python.org/issue36027> ___ ___ Python-bugs-list m

[issue39648] Expand math.gcd() and math.lcm() to accept multiple arguments

2020-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: Merged; thank you to all involved. -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue39648] Expand math.gcd() and math.lcm() to accept multiple arguments

2020-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 559e7f165ad03731e6bc2211c0e6d8d9c02fb549 by Serhiy Storchaka in branch 'master': bpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments. (GH-18604) https://github.com/python/cpython/commit

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: @Ananthakrishnan: Do you know how arrays and pointers work in C? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: @Ananthakrishnan: Sure, go ahead. Let's make the process a bit more streamlined than last time around: see if you can put together a PR that passes all the CI checks before asking for review. If you get stuck, make a work-in-progress PR and ask for help

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Thanks and apologies for missing the duplicate. Not a problem: much better to have a potential bug reported twice than not at all. -- ___ Python tracker <https://bugs.python.org/issu

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, found the duplicate (or at least one of them): https://bugs.python.org/issue27463 -- components: +Interpreter Core -macOS resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Floor division is

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Shouldn't the two approaches provide the same answer? In a word, no. :-) math.floor(1/0.01) involves *two* operations, and there's an intermediate rounding step which happens to round the true mathematical result of 1/0.01 up to 100.0. Taking the fl

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-02-19 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset f2ee21d858bc03dd801b97afe60ee2ea289e2fe9 by ananthan-123 in branch 'master': bpo-39479:Add math.lcm() function: Least Common Multiple (#18547) https://github.com/python/cpython/commit/f2ee21d858bc03dd801b97afe60ee2ea289e2fe9

[issue35081] Move internal headers to Include/internal/

2020-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue35081> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39657] Bezout and Chinese Remainder Theorem in the Standard Library?

2020-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: > Should something like the following go in the standard library, most likely > in the math module? I'm not keen. Granted that the math module has exceeded its original remit of "wrappers for libm", but even so, I'd prefer to try to limit i

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: What's slightly more interesting is the return value for a single argument `a`, where we should be careful to return `abs(a)` rather than simply `a`. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Should it take variable number of positional arguments or a single iterable > argument as max() and min()? Good question: the obvious extension to the current function would be to allow it to take multiple scalar arguments. But I don't muc

[issue39644] Add Binary module.

2020-02-16 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39644> ___ ___

[issue39644] Add Binary module.

2020-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: I'm going to close this, for two reasons: - It's not well-formed enough for a b.p.o. issue: there are too many details to be worked out and questions to be answered. As it stands, there's nothing actionable here. - Adding a new module to the Python std

[issue39629] inspect.signature fails on math.hypot

2020-02-13 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue39629> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-12 Thread Mark Dickinson
Mark Dickinson added the comment: > _Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable, > but also private. Understood; thanks. I agree that there shouldn't be a guarantee for private undocumented calls. -- ___

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Mark Dickinson
Mark Dickinson added the comment: [Julien Danjou] > As you said, if it's not part of the stable ABI it makes sense. I think this is a misunderstanding of what the stable ABI is for. I'm not sure whether this is spelled out explicitly anywhere, but my understanding was that ABI break

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Hi Katherine, My report was really just about the last sentence, but I agree that the "narrower" language is confusing here. If someone says that a type "A" is narrower than type "B", that suggests to my ears that "A&

[issue39484] time_ns() and time() cannot be compared on windows

2020-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: Here's another way to see it. Let's get the Unix timestamp for right now: >>> from datetime import datetime >>> epoch = datetime(1970, 1, 1) >>> now = (datetime.now() - epoch).total_seconds() >>> now 1581261916.910558

[issue39484] time_ns() and time() cannot be compared on windows

2020-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: > Yes, but you get the first 1 bit for free. Not really. :-) That's a detail of how floating-point numbers happen to be stored; it's not really relevant here. It doesn't affect the fact that IEEE 754 binary64 floats have 53 bits of *precision*, so using

[issue39484] time_ns() and time() cannot be compared on windows

2020-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: [Larry] > It takes *30* bits to store the non-fractional seconds part of the current > time in a double I make it 31. :-) >>> from datetime import datetime >>> time_since_epoch = datetime.now() - datetime(1970, 1, 1) >>> i

[issue39581] Python Interpreter Doesn't Work Well In Thread Class

2020-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: There's no other reasonable way for Python to work here. It *is* an error to pass something that's not a callable as a thread "target", but it's a coding error that can only be detected at runtime, not a syntax error that can be detected statica

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed that this seems surprising. @Vedran: Trailing zeros in a Decimal object are significant, so `Decimal("2.0")` and `Decimal("2.00")` are different (equal, but different). The rules about the "ideal exponent" of the res

[issue39558] Implement __len__() for itertools.combinations

2020-02-05 Thread Mark Dickinson
Change by Mark Dickinson : -- superseder: -> Add __len__ to map, everything in itertools ___ Python tracker <https://bugs.python.org/issue39558> ___ ___ Py

[issue39558] Implement __len__() for itertools.combinations

2020-02-05 Thread Mark Dickinson
Mark Dickinson added the comment: This is essentially a duplicate of #27678 and #24849 (and there may be others). Note that the math module now has `prod`, `comb` and `perm`, which match the lengths of the full `product`, `combinations` and `permutations` itertools functions

[issue39557] ThreadPoolExecutor is busy-waiting when idle.

2020-02-05 Thread Mark Dickinson
Mark Dickinson added the comment: It would also be helpful to know which platform you're observing the 100% CPU usage on, so that we can try to reproduce. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39557] ThreadPoolExecutor is busy-waiting when idle.

2020-02-05 Thread Mark Dickinson
Mark Dickinson added the comment: On the HEAD of the current 3.7 branch, the file you refer to has the following code starting at line 37: while True: work_item = work_queue.get(block=True) if work_item is not None: work_item.run

[issue39280] Don't allow datetime parsing to accept non-Ascii digits

2020-02-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue39280> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2020-02-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue8912> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19683] test_minidom has many empty tests

2020-02-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue19683> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39108] random needs doc for "gauss" versus "normalvariate"

2020-02-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue39108> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2020-02-03 Thread Mark Dickinson
Mark Dickinson added the comment: Let's close. This was only ever an issue in Python 2. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.o

[issue39480] referendum reference is needlessly annoying

2020-02-03 Thread Mark Dickinson
Mark Dickinson added the comment: Speaking as a British, UK-based Python contributor who's unhappy with recent political developments in the UK, I say let's close this. -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.

[issue39484] time_ns() and time() cannot be compared on windows

2020-02-03 Thread Mark Dickinson
Mark Dickinson added the comment: To be clear: the following is flawed as an accuracy test, because the *multiplication* by 1e9 introduces additional error. # int/int: int.__truediv__(int) >>> abs(t - int(t/10**9 * 1e9)) 172 Try this instead, which uses the Fractions module to get

<    3   4   5   6   7   8   9   10   11   12   >