[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Andrew Yurisich
Andrew Yurisich added the comment: This issue was raised due to a misunderstanding of the namedtuple creation process. After creating the fields, but before assigning them, __spec__ is trivially added to namedtuple class' definition as a property. Thanks again @serhiy.storchaka --

[issue30618] readlink for pathlib paths

2019-07-19 Thread Girts Folkmanis
Change by Girts Folkmanis : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37635] Using constant for whence arg in seek()

2019-07-19 Thread Kyle Stanley
Change by Kyle Stanley : -- assignee: -> docs@python components: +Documentation, Tests nosy: +docs@python ___ Python tracker ___

[issue37635] Using constant for whence arg in seek()

2019-07-19 Thread Kyle Stanley
New submission from Kyle Stanley : In Python 3.1, three constants were added to the IO module to be used for the whence argument of seek(): SEEK_SET or 0 – start of the stream SEEK_CUR or 1 – current stream position SEEK_END or 2 – end of the stream However, there are at least 102

[issue37609] support "UNC" device paths in ntpath.splitdrive

2019-07-19 Thread Ngalim Siregar
Ngalim Siregar added the comment: I was unsure about implementation in the patch, do you have UNC format specification? -- nosy: +nsiregar ___ Python tracker ___

[issue32912] Raise non-silent warning for invalid escape sequences

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: > In other words, it seems to me that getting in the way of > this broken end-user strategy is a *good* thing, since it > warns of possible mistakes. Here's an example from the current version of Bottle (0.12.17):

[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-07-19 Thread Antonio Gutierrez
Change by Antonio Gutierrez : -- keywords: +patch pull_requests: +14655 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14868 ___ Python tracker

[issue37620] str.split(sep=None, maxsplit=-1,any=False)

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Harry, thanks for the suggestion but we're going to pass for now. For the most part, str.split() has stood the test of time and we use regexes for more customized or complicated variants. In general, adding API options increases complexity for users,

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2019-07-19 Thread daniel hahler
daniel hahler added the comment: Note that "module" might also be the filename (with ".py" removed). I've just created issue37634 - might be worth including in your PR if it makes sense to only document this. -- nosy: +blueyed ___ Python tracker

[issue37634] doc: "module" of a warning might be its filename

2019-07-19 Thread daniel hahler
New submission from daniel hahler : With e.g. DeprecationWarnings for "invalid escape sequence" the "module" part is the file name (with ".py" removed), because it calls PyErr_WarnExplicitObject directly:

[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-19 Thread Brett Cannon
Brett Cannon added the comment: Why would was want to swallow an exception? I think it would be better to let the exception propagate. -- nosy: +brett.cannon ___ Python tracker

[issue29446] Improve tkinter 'import *' situation

2019-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that for python x.y, the names imported by 'import *' should be fixed and *not* depend on other imports. -- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-07-19 Thread PyScripter
New submission from PyScripter : Py_CompileString and PyParser_SimpleParseString and possibly other related functions are not exported in Python 3.8 b2 DLL. This is unintentional, not documented and unnecessarily breaks backward compatibility. Issue 37189 was similar and related to

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Andrew Yurisich
Andrew Yurisich added the comment: You're right, I was invoking the namedtuple on the same line that I was defining it, freezing it in the process. I split it to into two statements, and snuck the __spec__ attribute between the definition and the instantiation. I'll update the examples on my

[issue37618] Docs: Code example locations in stdtypes

2019-07-19 Thread Kyle Stanley
Kyle Stanley added the comment: >In my opinion the current documentation is correctly formed since the >bytearray and str are two different classes in Python they could have >different set of functions supported and hence the grouping of functions like >islower() to be kept separated for

[issue34160] ElementTree not preserving attribute order

2019-07-19 Thread Stefan Behnel
Stefan Behnel added the comment: I created a PR that adds a couple of paragraphs to the documentation. Comments welcome. -- versions: +Python 3.9 ___ Python tracker ___

[issue34160] ElementTree not preserving attribute order

2019-07-19 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +14654 pull_request: https://github.com/python/cpython/pull/14867 ___ Python tracker ___

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not hard to set __spec__ (as well as any other attributes) after creating a namedtuple class. A = namedtuple(...) A.__spec__ = ... or class A(namedtuple(...)): __spec__ = ... __spec__ do not have anything to namedtuple. It is not like

[issue35625] Comprehension doc doesn't mention buggy class scope behavior

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As a documentation issue this is a duplicate of issue26951. -- stage: -> resolved status: open -> closed superseder: -> Unintuitive error when using generator expression in class property ___ Python tracker

[issue37620] str.split(sep=None, maxsplit=-1,any=False)

2019-07-19 Thread Harry Coin
Harry Coin added the comment: I suspect the number of times the str.split builtin was examined for use and rejected in favor of the much more complex and 'heavy' re module far, far exceeds the number of times it found use with more than one character in the split string. The str.split

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-07-19 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26951] Unintuitive error when using generator expression in class property

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue3692. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue37632] generator expression doesn't find subclass

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue3692. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> improper scope in list comprehension, when used in class declaration

[issue37620] str.split(sep=None, maxsplit=-1,any=False)

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An alternative is to use regular expressions. >>> re.split('[\t ]+', 'ab\t cd ef') ['ab', 'cd', 'ef'] . -- nosy: +serhiy.storchaka ___ Python tracker

[issue29446] Improve tkinter 'import *' situation

2019-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer Eric's approach. It excludes tkinter submodules (like tkinter.ttk). Currently the result of the star import depends on what submodules were imported before. I think it would be better to make it more stable. --

[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-07-19 Thread Neil Schemenauer
Neil Schemenauer added the comment: I changed configure.in to use AC_ARG_VAR instead. So, you can override it as you suggest: ./configure [..] PROFILE_TASK="-m test --pgo-extended" -- ___ Python tracker

[issue9216] FIPS support for hashlib

2019-07-19 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Providing a simple keyword as a workaround for bypassing the FIPS restrictions, could potentially violate the standard, as there is no way from the python side to verify if the code in question is used for security purposes or not. Thus I would close

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Some thoughs: * Lib/sets.py benefitted significantly from itertools and METH_COEXIST. * The dunder methods are part of the public API. Serhiy's persona tastes aside, there is no reason not to use them like any other method. * Given a performance

[issue37632] generator expression doesn't find subclass

2019-07-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think it's about a class being defined inside another class and not about subclass. This seems to be similar to https://bugs.python.org/issue3692 that discusses about class attribute scope for comprehension. -- nosy: +xtreak

[issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST

2019-07-19 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Could you provide more info, e.g. comparison between the proper and the erroneous output, as well as what it affects (test_gdb if I recall correctly)? -- nosy: +cstratak ___ Python tracker

[issue37496] Support annotations in signature strings.

2019-07-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: You might want to look into how PEP 563 is implemented, it has a utility to turn an AST back into a string (I assume this is what you want). -- ___ Python tracker

[issue29446] Improve tkinter 'import *' situation

2019-07-19 Thread Flavian Hautbois
Change by Flavian Hautbois : -- keywords: +patch pull_requests: +14653 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14864 ___ Python tracker

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2019-07-19 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14652 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14863 ___ Python tracker ___

[issue37632] generator expression doesn't find subclass

2019-07-19 Thread Ákos Tompos
New submission from Ákos Tompos : The following code does work on python 2.7 but fails on python 3.7. The code seems correct. class A: class B: def __init__(self, param): self.param = param l = [B(i) for i in range(10)] The result on: 3.7.3

[issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs

2019-07-19 Thread Mariatta
Mariatta added the comment: Sure, moving it up is a good start. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16512] imghdr doesn't recognize variant jpeg formats

2019-07-19 Thread Pierre Chopin
Change by Pierre Chopin : -- pull_requests: +14651 pull_request: https://github.com/python/cpython/pull/14862 ___ Python tracker ___

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Pierre Chopin
Pierre Chopin added the comment: This is actually a duplicate of bpo-16512, i am closing this. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-19 Thread Daniel
Daniel added the comment: Thanks, just didn't expect that behavior. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2019-07-19 Thread Flavian Hautbois
Flavian Hautbois added the comment: Are you going to open a PR for this patch? I think that would be a nice addition -- nosy: +flavianhautbois ___ Python tracker ___

[issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs

2019-07-19 Thread Krishna Oza
Krishna Oza added the comment: Mariatta, Would it be okay for now just to move the existing bug filing guidelines to be moved up. -- nosy: +Krishna Oza ___ Python tracker

[issue37618] Docs: Code example locations in stdtypes

2019-07-19 Thread Krishna Oza
Krishna Oza added the comment: Kyle In my opinion the current documentation is correctly formed since the bytearray and str are two different classes in Python they could have different set of functions supported and hence the grouping of functions like islower() to be kept separated for

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: 2019年7月19日(金) 22:00 Phil Thompson : > > If I fail to protect against using a feature when it is no longer > present then it's a bug in my code and it won't compile. Providing a > deprecation warning gives me some notice that my code needs to be > changed. That is

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Krishna Oza
Krishna Oza added the comment: Victor I have debugged the issue and found that the jpg file shared doesnt have the information in its header to identify the file format of this file. The imghdr module needs file format information in first 32 bytes when the jpg file is read in binary mode.

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Phil Thompson
Phil Thompson added the comment: >> Which is why I protect the initialisation with #if PY_VERSION_HEX < > 0x0309 > > It is your specific case. We can not assume people do it, or even you > never forget it. So this is not the "right thing" we can recommend to > all users. > > Once you

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Krishna Oza
Change by Krishna Oza : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Krishna Oza
Krishna Oza added the comment: The documentation at https://docs.python.org/3/library/imghdr.html?highlight=imghdr#module-imghdr says that JPEG files with JPEG data in JFIF or Exif formats are only supported as of now. Pierre Chopin could help with what format of jpeg you have uploaded.

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: > Which is why I protect the initialisation with #if PY_VERSION_HEX < 0x0309 It is your specific case. We can not assume people do it, or even you never forget it. So this is not the "right thing" we can recommend to all users. Once you or other people

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I support the patch proposed in https://bugs.python.org/file48478/pyport.h.diff but it's not up to me to make that decision. -- ___ Python tracker

[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-07-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +14650 pull_request: https://github.com/python/cpython/pull/14860 ___ Python tracker ___

[issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST

2019-07-19 Thread Marcel Plch
New submission from Marcel Plch : Problem: If you want to override CFLAGS by setting EXTRA_CFLAGS, they may have no effect if there are contrary flags in the CFLAGS_NODIST variable. How to reproduce: make CFLAGS_NODIST="-O2" EXTRA_CFLAGS="-Og" If you look at GCC arguments, there is -O2

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-07-19 Thread Ben Brown
Ben Brown added the comment: With some more research it looks like the issue is flow related, I experimented with the StreamWriter in a simple server and using that plus drain() appears to have worked an I no longer get the error. I have added my new server to the gist I posted above.

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Phil Thompson
Phil Thompson added the comment: On 19/07/2019 11:37, Jeroen Demeyer wrote: > Jeroen Demeyer added the comment: > >> We have some reserved/deprecated/unused fields. Setting 0 to them >> makes forward incompatible code. > > Good point. tp_print is removed in 3.9 Which is why I protect the

[issue37630] Investigate replacing SHA3 code with OpenSSL

2019-07-19 Thread Christian Heimes
New submission from Christian Heimes : Recent OpenSSL comes with SHA3. Now that Python is going to drop support for old OpenSSL, we can consider to use OpenSSL's SHA3 and drop the reference implementation from Python. For variable length SHAKE API, OpenSSL added EVP_MD_CTRL_XOF_LEN and

[issue36182] Path.write_text() docs do not include the case that a file exists

2019-07-19 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Pinging for review. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > We have some reserved/deprecated/unused fields. Setting 0 to them makes > forward incompatible code. Good point. tp_print is removed in 3.9 -- ___ Python tracker

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Pierre Chopin
New submission from Pierre Chopin : the imghdr library only checks for the presence of (b'JFIF', b'Exif') in the header, which is excluding some valid JPEG file. This is an example of not recognised ile -- files: e2006bd7-51d7-4554-9738-ea13207fd104.jpg messages: 348161 nosy: pchopin

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: > I am not "touching" tp_print. I am simply defining it as 0 to avoid the > missing initialiser warning. I meant it. `tp_print = 0` touches the deprecated `tp_print` field. It is not forward compatible. Note that we need to re-add tp_print only for C code

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I think using a dataclass here would be easier, since you can control class variables. Is there some reason that your loader must be a namedtuple? Something like: from typing import ClassVar from dataclasses import dataclass @dataclass class MyLoader:

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Phil Thompson
Phil Thompson added the comment: I am not "touching" tp_print. I am simply defining it as 0 to avoid the missing initialiser warning. My point is that it should be possible to write code that doesn't trigger warnings (whether or not you suppress them). --

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Misc side notes: * There is no expected behavior for negative a negative weight. Arguably, the only reasonable interpretation is what it already does (reduce the cumulative total). * Running simulations is a primary use case for choices(). Generally,

[issue36546] Add quantiles() to the statistics module

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e5bfd1ce9da51b64d157392e0a831637f7335ff5 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36546: Clean-up comments (GH-14857) (#14859) https://github.com/python/cpython/commit/e5bfd1ce9da51b64d157392e0a831637f7335ff5

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset a50a6225a06e5a83ce2a880a7eb4496043fdbb55 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)

[issue36546] Add quantiles() to the statistics module

2019-07-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +14649 pull_request: https://github.com/python/cpython/pull/14859 ___ Python tracker ___

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +14648 pull_request: https://github.com/python/cpython/pull/14858 ___ Python tracker ___

[issue36546] Add quantiles() to the statistics module

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset eed5e9a9562d4dcd137e9f0fc7157bc3373c98cc by Raymond Hettinger in branch 'master': bpo-36546: Clean-up comments (GH-14857) https://github.com/python/cpython/commit/eed5e9a9562d4dcd137e9f0fc7157bc3373c98cc --

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8dbe563aa6bd18b8c581951537dfb406d36e8063 by Raymond Hettinger in branch 'master': bpo-37624: Document weight assumptions for random.choices() (GH-14855) https://github.com/python/cpython/commit/8dbe563aa6bd18b8c581951537dfb406d36e8063

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Closed #37614 in favor of this. We now have only Python with FSR and mostly only tcl 8.6 to worry about. But I presume the Windows clipboard still uses uft-16le. Experimenting with pasting Ң or 'Ң', I usually get the 'ed' message as before, but with the

[issue36546] Add quantiles() to the statistics module

2019-07-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +14647 pull_request: https://github.com/python/cpython/pull/14857 ___ Python tracker ___

[issue37399] XML text behaviour change if there are comments

2019-07-19 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +14646 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14856 ___ Python tracker

[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: I think it's bad idea that suppressing deprecation warning to suppress the warning for deprecated member. It is highly recommended to "not" touching tp_print. Why you want to suppress deprecation warning, not missing field initialisers? You can suppress the

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +14645 pull_request: https://github.com/python/cpython/pull/14855 ___ Python tracker ___

[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: >./configure [...] --with-profile-task='-m test --pgo-extended' I think this is abusing of `--with` options. `--with-*` is for external software [1]. But `--with-lto` option abuses it already. How about `./configure PROFILE_TASKS="-m test --pgo-extend"`?

[issue37628] IDLE Font Sample distracting and too large

2019-07-19 Thread Raymond Hettinger
New submission from Raymond Hettinger : The "font sample" bar on the General tab in Preferences is problematio. With some font sizes, it grows so large that there is no way to mouse downward to click "accept". Making the window smaller and perhaps only showing one or two samples would be a

[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-19 Thread Raymond Hettinger
New submission from Raymond Hettinger : Today, I did some user testing for the 3.8 beta when teaching the argparse module. The new "Run Customized" option needs two usability tweaks. 1) Move the menu option up by one so that the regular F5 "run" is last -- learners we having a hard time

[issue37614] Pasteing into idle makes it crash

2019-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: As said multiple times on #13153, IDLE exits with a traceback that is visible when it is started from a command line (python -m idlelib). It usually ends with File "F:\dev\3x\lib\tkinter\__init__.py", line 1420, in mainloop self.tk.mainloop(n)

[issue37620] str.split(sep=None, maxsplit=-1,any=False)

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: This API is already overloaded with two distinct algorithms -- see https://stackoverflow.com/questions/16645083 . If new functionality is truly needed, it should be in a separate method rather than feature creeping in additional variants. Also, the

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Brett, do you have any thoughts on this? My initial take is that __spec__ is primarily about import logic and that it likely shouldn't creep into exec'd code like dataclasses and named tuples. Also, I'm reluctant to expand the API for something that

[issue31689] random.choices does not work with negative weights

2019-07-19 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: issue37624: not adding an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. -- nosy: +aldwinaldwin ___ Python tracker

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: We can add a note the the docs that weights are assumed to be non-negative, but I don't want to add an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. --

[issue37547] Add _PyObject_CallMethodOneArg()

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: New changeset d3952096537d9d2706e10af0c0596daeee6a58c9 by Inada Naoki (Zackery Spytz) in branch 'master': bpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785) https://github.com/python/cpython/commit/d3952096537d9d2706e10af0c0596daeee6a58c9

[issue37626] Documentation:conflict between docs

2019-07-19 Thread Inada Naoki
Inada Naoki added the comment: https://docs.python.org/3/library/inspect.html#inspect.Parameter.replace """ Changed in version 3.4: In Python 3.3 Parameter objects were allowed to have name set to None if their kind was set to POSITIONAL_ONLY. This is no longer permitted. """ --