Re: What is Install-Paths-To in WHEEL file?

2023-12-30 Thread Oscar Benjamin via Python-list
On Sun, 31 Dec 2023 at 00:35, Left Right wrote: > > It's not for you to choose the way I communicate. There are accepted > boundaries, and I'm well within those boundaries. Anything beyond that > is not something I'm even interested in hearing your opinion on. You might not be interested in my

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Oscar Benjamin via Python-list
On Fri, 29 Dec 2023 at 22:38, Left Right via Python-list wrote: > > > Then your understanding is flat-out wrong. Encouraging participation > > by everyone DOES mean deleting what is unproductive, offensive, and > > likely to discourage participation. > > I haven't written anything unproductive or

Re: What is Install-Paths-To in WHEEL file?

2023-12-29 Thread Oscar Benjamin via Python-list
On Fri, 29 Dec 2023 at 13:04, Left Right via Python-list wrote: > > Wow. That place turned out to be the toxic pit I didn't expect. > > It's a shame that a public discussion of public goods was entrusted to > a bunch of gatekeepers with no sense of responsibility for the thing > they keep the

Re: on writing a number as 2^s * q, where q is odd

2023-12-03 Thread Oscar Benjamin via Python-list
On Sun, 3 Dec 2023 at 10:25, Julieta Shem via Python-list wrote: > > Alan Bawden writes: > > > > def powers_of_2_in(n): > > bc = (n ^ (n - 1)).bit_count() - 1 > > return bc, n >> bc > > That's pretty fancy and likely the fastest. It might be the fastest but it depends how big you expect

Re: txtorcon 23.5.0

2023-05-19 Thread Benjamin Schollnick
package then it’s worth the couple of sentences or a short paragraph to allow someone that is unfamiliar with the package to be able to see if they should investigate the package. Cryptic names maybe cute, but if they are not descriptive, then they are not really that helpful other than being un

Re: txtorcon 23.5.0

2023-05-19 Thread Benjamin Schollnick
ake this as the creative criticism that I am offering it as. - Benjamin > On May 18, 2023, at 9:37 PM, mee...@meejah.ca wrote: > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > I'm happy to announce txtorcon 23.5.0 with the following changes: > > *

Re: Learning tkinter

2023-05-18 Thread Oscar Benjamin
On Thu, 18 May 2023 at 10:16, Rob Cliffe via Python-list wrote: > > I am trying to learn tkinter. > Several examples on the internet refer to a messagebox class > (tkinter.messagebox). > But: > > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 >

Re: An "adapter", superset of an iterator

2023-05-03 Thread Oscar Benjamin
On Wed, 3 May 2023 at 18:52, Thomas Passin wrote: > > On 5/3/2023 5:45 AM, fedor tryfanau wrote: > > I've been using python as a tool to solve competitive programming problems > > for a while now and I've noticed a feature, python would benefit from > > having. > > Consider

Re: Christoph Gohlke and compiled packages

2023-04-11 Thread Oscar Benjamin
On Tue, 11 Apr 2023 at 14:55, Mats Wichmann wrote: > > On 4/11/23 06:03, Roel Schroeven wrote: > > Op 11/04/2023 om 12:58 schreef Chris Angelico: > > >> Python itself is fine, but a lot of third-party packages are hard to > >> obtain. So if you need numpy, for instance, or psycopg2, you might >

Re: Christoph Gohlke and compiled packages

2023-04-11 Thread Oscar Benjamin
On Tue, 11 Apr 2023 at 12:01, Chris Angelico wrote: > > On Tue, 11 Apr 2023 at 20:15, Jim Schwartz wrote: > > > > What’s the problem now? Is it with python on windows? I use python on > > windows so I’d like to know. Thanks > > > > Python itself is fine, but a lot of third-party packages are

Re: built-in pow() vs. math.pow()

2023-03-31 Thread Oscar Benjamin
On Fri, 31 Mar 2023 at 20:24, Peter J. Holzer wrote: > > On 2023-03-31 07:39:25 +0100, Barry wrote: > > On 30 Mar 2023, at 22:30, Chris Angelico wrote: > > > It's called math.pow. That on its own should be a strong indication > > > that it's designed to work with floats. > > > > So long as you

Re: built-in pow() vs. math.pow()

2023-03-30 Thread Oscar Benjamin
On Thu, 30 Mar 2023 at 17:31, Andreas Eisele wrote: > > I sometimes make use of the fact that the built-in pow() function has an > optional third argument for modulo calculation, which is handy when dealing > with tasks from number theory, very large numbers, problems from Project > Euler,

Re: Debugging reason for python running unreasonably slow when adding numbers

2023-03-14 Thread Oscar Benjamin
On Tue, 14 Mar 2023 at 16:27, Alexander Nestorov wrote: > > I'm working on an NLP and I got bitten by an unreasonably slow behaviour in > Python while operating with small amounts of numbers. > > I have the following code: > > ```python > import random, time > from functools import reduce > >

Re: Python 3.10 Fizzbuzz

2023-02-28 Thread Oscar Benjamin
On Tue, 28 Feb 2023 at 20:55, Mats Wichmann wrote: > > On 2/27/23 16:42, Oscar Benjamin wrote: > > On Mon, 27 Feb 2023 at 21:06, Ethan Furman wrote: > >> > >> On 2/27/23 12:20, rbowman wrote: > >> > >> > "By using Black, you agree to

Re: Python 3.10 Fizzbuzz

2023-02-27 Thread Oscar Benjamin
On Mon, 27 Feb 2023 at 21:06, Ethan Furman wrote: > > On 2/27/23 12:20, rbowman wrote: > > > "By using Black, you agree to cede control over minutiae of hand- > > formatting. In return, Black gives you speed, determinism, and freedom > > from pycodestyle nagging about formatting. You will save

Re: Precision Tail-off?

2023-02-18 Thread Oscar Benjamin
On Sat, 18 Feb 2023 at 11:19, Peter J. Holzer wrote: > > On 2023-02-18 03:52:51 +, Oscar Benjamin wrote: > > On Sat, 18 Feb 2023 at 01:47, Chris Angelico wrote: > > > On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list > > > > To avoid it you would need

Re: Precision Tail-off?

2023-02-17 Thread Oscar Benjamin
On Sat, 18 Feb 2023 at 01:47, Chris Angelico wrote: > > On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list > wrote: > > > > On 18/02/23 7:42 am, Richard Damon wrote: > > > On 2/17/23 5:27 AM, Stephen Tucker wrote: > > >> None of the digits in RootNZZZ's string should be different from the

Re: Precision Tail-off?

2023-02-17 Thread Oscar Benjamin
On Fri, 17 Feb 2023 at 10:29, Stephen Tucker wrote: > > Thanks, one and all, for your reponses. > > This is a hugely controversial claim, I know, but I would consider this > behaviour to be a serious deficiency in the IEEE standard. [snip] > > Perhaps this observation should be brought to the

Re: Precision Tail-off?

2023-02-14 Thread Oscar Benjamin
On Tue, 14 Feb 2023 at 07:12, Stephen Tucker wrote: > > Hi, > > I have just produced the following log in IDLE (admittedly, in Python > 2.7.10 and, yes I know that it has been superseded). > > It appears to show a precision tail-off as the supplied float gets bigger. > > I have two questions: >

Re: HTTP server benchmarking/load testing in Python

2023-01-26 Thread Benjamin Schollnick
ng, it’s the OS and CPU protecting themselves from overheating. Usually because the manufacturer didn’t add enough cooling to keep the system cool enough with a continuous load. (Which to be honest, almost no laptop designers do, because they assuming you are going to be having a spiky load instead… - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: ok, I feel stupid, but there must be a better way than this! (finding name of unique key in dict)

2023-01-20 Thread Oscar Benjamin
On Fri, 20 Jan 2023 at 17:30, Dino wrote: > > let's say I have this list of nested dicts: > > [ >{ "some_key": {'a':1, 'b':2}}, >{ "some_other_key": {'a':3, 'b':4}} > ] > > I need to turn this into: > > [ >{ "value": "some_key", 'a':1, 'b':2}, >{ "value": "some_other_key", 'a':3,

Re: Does one have to use curses to read single characters from keyboard?

2022-12-11 Thread Oscar Benjamin
On Sun, 11 Dec 2022 at 15:55, Chris Green wrote: > > Is the only way to read single characters from the keyboard to use > curses.cbreak() or curses.raw()? If so how do I then read characters, > it's not at all obvious from the curses documentation as that seems to > think I'm using a GUI in some

Re: Parallel(?) programming with python

2022-08-08 Thread Oscar Benjamin
On Mon, 8 Aug 2022 at 19:01, Andreas Croci wrote: > > tI would like to write a program, that reads from the network a fixed > amount of bytes and appends them to a list. This should happen once a > second. > > Another part of the program should take the list, as it has been filled > so far, every

Re: Why isn't there a built-in product()?

2022-07-07 Thread Oscar Benjamin
On Thu, 7 Jul 2022 at 22:55, Michael F. Stemper wrote: > > sum() is wonderful. > > >>> nums = [1,2,3] > >>> sum(nums) > 6 > >>> product(nums) > Traceback (most recent call last): > File "", line 1, in > NameError: name 'product' is not defined > >>> > > I understand that there

Re: Automatic Gain Control in Python?

2022-05-29 Thread Benjamin Schollnick
locate it for reference. - Benjamin > On May 29, 2022, at 3:18 PM, Grant Edwards wrote: > > On 2022-05-29, Benjamin Schollnick wrote: > >> Why not just right a 3rd party package to normalize the audio levels >> in the digital file? It’ll be faster, and probab

Re: Automatic Gain Control in Python?

2022-05-29 Thread Benjamin Schollnick
audio level, and then adjusting the volume out of the Smart Speaker is really doing more than adding complexity. An all analog solution might be the better route, although finding something that is inexpensive might be an issue as well. - Benjamin > On May 29, 2022, at 11:32 AM,

Re: Automatic Gain Control in Python?

2022-05-29 Thread Benjamin Schollnick
4/how-to-normalize-a-raw-audio-file-with-python <https://stackoverflow.com/questions/57925304/how-to-normalize-a-raw-audio-file-with-python> - Benjamin > On May 29, 2022, at 11:04 AM, Steve GS wrote: > >>> From your description, your fundamental problem is you ar

Re: C is it always faster than nump?

2022-02-25 Thread Oscar Benjamin
On Sat, 26 Feb 2022 at 03:10, Dennis Lee Bieber wrote: > > On Fri, 25 Feb 2022 23:06:57 + (UTC), Avi Gross > declaimed the following: > > >I do have to wonder if anyone ever considered adding back enough > >functionality into base Python to make some additions less needed. Is there > >any

Re: C is it always faster than nump?

2022-02-25 Thread Oscar Benjamin
On Fri, 25 Feb 2022 at 23:13, Barry wrote: > > > On 25 Feb 2022, at 23:00, Richard Damon wrote: > > > > On 2/25/22 2:47 PM, Chris Angelico wrote: > >>> On Sat, 26 Feb 2022 at 05:49, Richard Damon > >>> wrote: > >>> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote: > Hi, > a lot of

Re: Best way to check if there is internet?

2022-02-25 Thread Benjamin Schollnick
erl, and a few other languages as well. How many “scripts” have been throw quickly together in Perl, or PHP? Quite a damn few, yet, would anyone call Wordpress a “script”? It’s effectively damning with faint praise. - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 0bb40a42d71873ea267aace8c92a02d66fe36dc2 by Dong-hee Na in branch 'main': closes bpo-46736: SimpleHTTPRequestHandler now uses HTML5. (GH-31533) https://github.com/python/cpython/commit/0bb40a42d71873ea267aace8c92a02d66fe36dc2

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: clang doesn't like the typedef forward-decl: In file included from ../cpython/Modules/_ctypes/_ctypes.c:108: In file included from ../cpython/Include/Python.h:43: ../cpython/Include/object.h:109:3: warning: redefinition of typedef 'PyObject' is a C11

Re: Pypy with Cython

2022-02-03 Thread Oscar Benjamin
On Thu, 3 Feb 2022 at 23:16, Greg Ewing wrote: > > On 4/02/22 5:07 am, Albert-Jan Roskam wrote: > > On Feb 3, 2022 17:01, Dan Stromberg wrote: > > > > What profiler do you recommend > > If it runs for that long, just measuring execution time should > be enough. Python comes with a

[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson
New submission from Benjamin Peterson : New changeset 1aa6be06c4cb7f04a340adb1c7b16b89803ef254 by Benjamin Peterson in branch 'main': closes bpo-46626: Expose IP_BIND_ADDRESS_NO_PORT socket option. (GH-31106) https://github.com/python/cpython/commit/1aa6be06c4cb7f04a340adb1c7b16b89803ef254

[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +29289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31106 ___ Python tracker <https://bugs.python.org/issu

[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson
Change by Benjamin Peterson : -- components: Library (Lib) nosy: benjamin.peterson priority: normal severity: normal status: open title: expose IP_BIND_ADDRESS_NO_PORT linux socket option type: enhancement versions: Python 3.11 ___ Python tracker

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 43c5c1369cb21f08a1dc1d63923c3586b883e3e8 by Julian Gilbey in branch 'main': closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387) https://github.com/python/cpython/commit

[issue38522] Py_USING_MEMORY_DEBUGGER is referenced in docs but not present in code

2021-12-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 9f0e40fae5191c3e3ed6109bd2e2f97aa0ac8d64 by Miss Islington (bot) in branch '3.10': closes bpo-38522 docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284) (GH-30295) https://github.com/python/cpython/commit

Re: Call julia from Python: which package?

2021-12-17 Thread Oscar Benjamin
On Fri, 17 Dec 2021 at 23:11, Chris Angelico wrote: > > On Sat, Dec 18, 2021 at 10:01 AM Oscar Benjamin > wrote: > > > > On Fri, 17 Dec 2021 at 22:40, Chris Angelico wrote: > > > > > > On Sat, Dec 18, 2021 at 9:24 AM Oscar Benjamin > > >

Re: Call julia from Python: which package?

2021-12-17 Thread Oscar Benjamin
On Fri, 17 Dec 2021 at 22:40, Chris Angelico wrote: > > On Sat, Dec 18, 2021 at 9:24 AM Oscar Benjamin > wrote: > > When I timed the result in Julia and in Python I found that the Julia > > code was slower than the Python code. Of course I don't know how to > > optimis

Re: Call julia from Python: which package?

2021-12-17 Thread Oscar Benjamin
On Fri, 17 Dec 2021 at 15:04, Albert-Jan Roskam wrote: > > Hi, > > I have a Python program that uses Tkinter for its GUI. It's rather slow so I > hope to replace many or all of the non-GUI parts by Julia code. Has anybody > experience with this? Any packages you can recommend? I found three >

[issue45582] Rewrite getpath.c in Python

2021-12-03 Thread Benjamin Peterson
Change by Benjamin Peterson : -- nosy: +benjamin.peterson nosy_count: 7.0 -> 8.0 pull_requests: +28131 pull_request: https://github.com/python/cpython/pull/29907 ___ Python tracker <https://bugs.python.org/issu

Re: pyinstaller wrong classified as Windows virus

2021-11-29 Thread Benjamin Schollnick
fender will either allow it to >> run or not. >> But if there is no reputation (eg no one has ever run it), that’s >> suspicious. And that’s what you are running into. >> You can submit the EXE to the defender team, which should allow it to >> operate properly with

Re: pyinstaller wrong classified as Windows virus

2021-11-29 Thread Benjamin Schollnick
or not. But if there is no reputation (eg no one has ever run it), that’s suspicious. And that’s what you are running into. You can submit the EXE to the defender team, which should allow it to operate properly without any issue. - Benjamin > On Nov 29, 2021, at 1:57 PM, Ba

Re: Why so fast a web framework?

2021-10-29 Thread Benjamin Schollnick
n’t be the concurrency/thread count??!?!?!?? I can believe 1,000 - 3,000, outrageously high, but believable. But 16K worth of concurrency/threads? I doubt that Wikipedia even has to dial it that high? I have to give them points for providing API latency, and framework overhead…. - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: Does loading PDB slow down execution?

2021-10-27 Thread Benjamin Schollnick
> On Oct 27, 2021, at 1:01 PM, Unixnut wrote: > > On 06/10/2021 18:30, Dieter Maurer wrote: >> Unixnut wrote at 2021-10-3 22:03 +0100: >>> If I run a python3 program with "import pdb" in the code, would it >>> execute slower than without loading the debugger? >> Importing `pdb` does not slow

[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-23 Thread Benjamin Szőke
Benjamin Szőke added the comment: A similar solution was introduced in VirtualBox some months ago. Soon, i could get back my Windows 10 developing PC and i can try this things. https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Runtime/r3/win/timer-win.cpp#L312

[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-23 Thread Benjamin Szőke
Change by Benjamin Szőke : -- nosy: +Livius ___ Python tracker <https://bugs.python.org/issue45429> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-10-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: See the superseding issue; 2to3 is deprecated and headed towards deletion. -- ___ Python tracker <https://bugs.python.org/issue30

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 9ce9cfe595d64e3081e69de7296042cc54bccf18 by Benjamin Peterson in branch 'main': bpo-45479: Futher simplify Py_UniversalNewlineFgets. (GH-28967) https://github.com/python/cpython/commit/9ce9cfe595d64e3081e69de7296042cc54bccf18

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-14 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +27255 pull_request: https://github.com/python/cpython/pull/28967 ___ Python tracker <https://bugs.python.org/issue45

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 160c38df7fc7ba22dc687879c387bf643ffc3398 by Benjamin Peterson in branch 'main': closes bpo-45479: Degunkify Py_UniversalNewlineFgets. (GH-28965) https://github.com/python/cpython/commit/160c38df7fc7ba22dc687879c387bf643ffc3398

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-14 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +27254 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28965 ___ Python tracker <https://bugs.python.org/issu

[issue45479] clean up Py_UniversalNewlineFgets

2021-10-14 Thread Benjamin Peterson
New submission from Benjamin Peterson : Py_UniversalNewlineFgets has a bunch of dead code and general gunk that should be removed. -- assignee: benjamin.peterson components: IO messages: 403970 nosy: benjamin.peterson priority: normal severity: normal status: open title: clean up

Re: sum() vs. loop

2021-10-13 Thread Oscar Benjamin
On Mon, 11 Oct 2021 at 23:00, Christian Gollwitzer wrote: > > Am 10.10.21 um 10:49 schrieb Steve Keller: > > I have found the sum() function to be much slower than to loop over the > > operands myself: > > > > def sum_products(seq1, seq2): > > return sum([a * b for a, b in zip(seq1, seq2)])

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-10 Thread Benjamin Szőke
Benjamin Szőke added the comment: In other words, using absolute timeout can eliminate the systematic error of desired sleep time. -- ___ Python tracker <https://bugs.python.org/issue21

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-10 Thread Benjamin Szőke
Benjamin Szőke added the comment: It is not true that there are no benefits. Absolute timeout using can reduce the overhead time of any variable and object intialization cost before the WaitForMultipleObjects() which will perform the real sleeping via blocking wait in pysleep

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-09 Thread Benjamin Szőke
Benjamin Szőke added the comment: Absolute timeout implementation via SetWaitableTimer() and GetSystemTimePreciseAsFileTime() is always better because it can reduce the "waste time" or "overhead time" what is always exist in any simple interval sleep implementation. More

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-09 Thread Benjamin Szőke
Benjamin Szőke added the comment: https://www.python.org/downloads/windows/ "Note that Python 3.10.0 cannot be used on Windows 7 or earlier." vstinner: Is it true that Windows 7 is not supported OS anymore? In this case we do not need to care about Windows 7 and earlier

Re: Different "look and feel" of some built-in functions

2021-10-02 Thread Oscar Benjamin
On Sat, 25 Sept 2021 at 02:11, Oscar Benjamin wrote: > On Sat, 25 Sept 2021 at 02:01, Chris Angelico wrote: > >> On Sat, Sep 25, 2021 at 10:56 AM Oscar Benjamin >> wrote: >> > >> > On Sat, 25 Sept 2021 at 00:37, Greg Ewing >> > wrote: >>

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-25 Thread Benjamin Szőke
Benjamin Szőke added the comment: Do you have any information about when will be it released in 3.11? -- ___ Python tracker <https://bugs.python.org/issue21

Re: Different "look and feel" of some built-in functions

2021-09-25 Thread Oscar Benjamin
On Sat, 25 Sept 2021 at 02:16, Chris Angelico wrote: > On Sat, Sep 25, 2021 at 11:11 AM Oscar Benjamin > wrote: > > > > On Sat, 25 Sept 2021 at 02:01, Chris Angelico wrote: > >> > >> On Sat, Sep 25, 2021 at 10:56 AM Oscar Benjamin > >> wrote: >

Re: Different "look and feel" of some built-in functions

2021-09-24 Thread Oscar Benjamin
On Sat, 25 Sept 2021 at 02:01, Chris Angelico wrote: > On Sat, Sep 25, 2021 at 10:56 AM Oscar Benjamin > wrote: > > > > On Sat, 25 Sept 2021 at 00:37, Greg Ewing > > wrote: > > > I suppose they could be fiddled somehow to make it possible, but > > &g

Re: Different "look and feel" of some built-in functions

2021-09-24 Thread Oscar Benjamin
On Sat, 25 Sept 2021 at 00:37, Greg Ewing wrote: > On 25/09/21 10:15 am, Steve Keller wrote: > > BTW, I like how the min() and max() functions allow both ways of being > > called. > > That wouldn't work for set.union and set.intersection, because as > was pointed out, they're actually methods,

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-22 Thread Benjamin Szőke
Change by Benjamin Szőke : -- pull_requests: +26917 pull_request: https://github.com/python/cpython/pull/28526 ___ Python tracker <https://bugs.python.org/issue21

[issue45262] crash if asyncio is used before and after re-initialization if using python embedded in an application

2021-09-22 Thread Benjamin Schiller
New submission from Benjamin Schiller : We have embedded Python in our application and we deinitialize/initialize the interpreter at some point of time. If a simple script with a thread that sleeps with asyncio.sleep is loaded before and after the re-initialization, then we get the following

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-14 Thread Benjamin Szőke
Change by Benjamin Szőke : -- pull_requests: +26754 pull_request: https://github.com/python/cpython/pull/28341 ___ Python tracker <https://bugs.python.org/issue21

[issue45190] unicode 14.0 upgrade

2021-09-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 024fda47d40b8cee77ac1cd3d31ee549edc11986 by Benjamin Peterson in branch 'main': closes bpo-45190: Update Unicode data to version 14.0.0. (GH-28336) https://github.com/python/cpython/commit/024fda47d40b8cee77ac1cd3d31ee549edc11986

[issue45190] unicode 14.0 upgrade

2021-09-14 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +26749 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28336 ___ Python tracker <https://bugs.python.org/issu

[issue45190] unicode 14.0 upgrade

2021-09-13 Thread Benjamin Peterson
New submission from Benjamin Peterson : Unicode 14.0 is expected on September 14. We'll need to do the usual table regenerations. -- assignee: benjamin.peterson components: Unicode messages: 401747 nosy: benjamin.peterson, ezio.melotti, vstinner priority: normal severity: normal

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-05 Thread Benjamin Szőke
Benjamin Szőke added the comment: Can you review my final implementation? https://github.com/python/cpython/pull/28111 -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue21

Re: on floating-point numbers

2021-09-03 Thread Oscar Benjamin
On Fri, 3 Sept 2021 at 13:48, Chris Angelico wrote: > > On Fri, Sep 3, 2021 at 10:42 PM jak wrote: > > > > Il 03/09/2021 09:07, Julio Di Egidio ha scritto: > > > On Friday, 3 September 2021 at 01:22:28 UTC+2, Chris Angelico wrote: > > >> On Fri, Sep 3, 2021 at 8:15 AM Dennis Lee Bieber > > >>

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-01 Thread Benjamin Szőke
Change by Benjamin Szőke : -- nosy: +Livius nosy_count: 5.0 -> 6.0 pull_requests: +26552 pull_request: https://github.com/python/cpython/pull/28111 ___ Python tracker <https://bugs.python.org/issu

[issue33930] Segfault with deep recursion into object().__dir__

2021-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset d7f5796a1ec7ba223f6a844d7580559abef05238 by Miss Islington (bot) in branch '3.8': bpo-33930: Fix typo in the test name. (GH-27735) https://github.com/python/cpython/commit/d7f5796a1ec7ba223f6a844d7580559abef05238

[issue33930] Segfault with deep recursion into object().__dir__

2021-08-11 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +26216 pull_request: https://github.com/python/cpython/pull/27736 ___ Python tracker <https://bugs.python.org/issue33

[issue33930] Segfault with deep recursion into object().__dir__

2021-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f08e6d1bb3c5655f184af88c6793e90908bb6338 by Benjamin Peterson in branch 'main': bpo-33930: Fix typo in the test name. (#27733) https://github.com/python/cpython/commit/f08e6d1bb3c5655f184af88c6793e90908bb6338

[issue33930] Segfault with deep recursion into object().__dir__

2021-08-11 Thread Benjamin Peterson
Change by Benjamin Peterson : -- nosy: +benjamin.peterson nosy_count: 14.0 -> 15.0 pull_requests: +26213 pull_request: https://github.com/python/cpython/pull/27733 ___ Python tracker <https://bugs.python.org/issu

[issue44871] Threading memory leak

2021-08-09 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Memory leak/high usage on copy in different thread ___ Python tracker <https://bugs.python

[issue39091] _PyErr_CreateException() must check that the result is an exception (CPython Segfault in 5 lines of code)

2021-08-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 83ca46b7784b7357d82ec47b33295e09ed7380cb by Noah in branch 'main': closes bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw. (#17658) https://github.com/python/cpython/commit

[issue37715] 2to3 set default encoding

2021-07-27 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2021-07-02 Thread Oscar Benjamin
Oscar Benjamin added the comment: I was contacted by someone interested in this so I've posted the last version above as a GitHub gist under the MIT license: https://gist.github.com/oscarbenjamin/4c1b977181f34414a425f68589e895d1 -- ___ Python

Re: Optimizing Small Python Code

2021-06-22 Thread Benjamin Schollnick
How would you measure the steps that it takes? - Benjamin > On Jun 22, 2021, at 7:04 PM, Greg Ewing wrote: > > On 23/06/21 3:03 am, Kais Ayadi wrote: >> for n in range(1, 7): >> print (n) >> for x in range(0, n): >> print(" &q

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-18 Thread Oscar Benjamin
On Fri, 18 Jun 2021 at 15:27, Michael Boom wrote: > The below issue is pretty serious and it is preventing me from using a > system I wrote on a larger scale. How do I get this bug fixed? Thanks. > https://bugs.python.org/issue43329 On Fri, 18 Jun 2021 at 06:07, Alexander Neilson wrote: > >

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Benjamin Lee
Benjamin Lee added the comment: > I'm not sure "alias" feels quite right, as it only applies to __init__ (if > I'm understanding it correctly). Maybe `init_alias` might be a better name. In any case, this would support private variable

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Benjamin Lee
Benjamin Lee added the comment: Would this issue not be trivially resolved if there was a way to specify alias in the dataclasses field? I.e.: _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None, init=False) Ultimately, the main goal is to make it so that the

[issue17681] Work with an extra field of gzip and zip files

2021-05-05 Thread Benjamin Sergeant
Benjamin Sergeant added the comment: type Header struct { Comment string// comment Extra []byte// "extra data" ModTime time.Time // modification time Namestring// file name OS byte // operating system type } This is what the header/ex

[issue17681] Work with an extra field of gzip and zip files

2021-05-05 Thread Benjamin Sergeant
Benjamin Sergeant added the comment: There is a comment field too which would be nice to support. The Go gzip module has a Header class that describe all the metadata. I see in 3.8 mtime was made configurable, so hopefully we can add comment and extra. https://golang.org/pkg/compress/gzip

Re: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Benjamin Schollnick
change, then a freakin’ computer programming language. - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

[issue42422] types.CodeType() has no bytecode verifier

2021-04-21 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43834] Use context manager in StringIO example

2021-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I agree that closing or using a context manager with StringIO (or BytesIO) is not something one normally has to do, so it doesn't need to be in the example. -- resolution: -> rejected status: open ->

[issue43602] Include Decimal's in numbers.Real

2021-04-16 Thread Oscar Benjamin
Oscar Benjamin added the comment: I've never found numbers.Real/Complex to be useful. The purpose of the ABCs should be that they enable you to write code that works for instances of any subclass but in practice writing good floating point code requires knowing something e.g. the base

[issue43850] unreproducible bytecode: set order depends on random seed for compiled bytecode

2021-04-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Let's keep any discussion on the preëxisting issue for this. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> support reproducible Python builds __

Re: not able to download PyAudio

2021-04-02 Thread Benjamin Schollnick
org/> and do a search. - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
o keep updating, because you’ll need to document every and all edge-cases, and then need to know when one of those edge cases breaks, etc. The core concept is documented, and it’s pretty straight-forward. I’m sorry, but it’s as if he’s arguing for the sake of arguing. It’s starting to feel

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
le > character can titlecase to two characters, or to a single character > that isn't the same as if you uppercase or lowercase it. See examples > in previous post. Or Kanji, etc. Where a single character can represent more than one in a different unicode standard, as I understand. -

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
> said, I doubt that .title() would make it into Python today if it weren't > there > already. I'm having fun with this. Ah, so while being a bit serious, I’m reading a bit too much into this. At this point, it’s become an interesting thought experiment for you. Good luck, - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
no place in the text string to put metadata that would help assist parsing the string. By definition the text can’t have metadata, since it’s plaintext. - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
how do we prevent it from titlecasing abbreviations? (This is plain text not XML…. If it was XML it would be easy!) - Benjamin -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
petition that it be moved into the standard library. Since this seems to be bugging you this much, come up with a solution. I suspect the problem you are going to have is that in effect you’ll be creating a multi-language parser, even worse, you may have to add nameparsing into this. Good luc

Re: How do I read .csv files

2021-03-16 Thread Benjamin Schollnick
really simplifies the learning process, and gives you a foundation to build upon. - Benjamin > On Mar 16, 2021, at 8:23 AM, Gys wrote: > > On 3/12/21 11:28 AM, Johann Klammer wrote: >> Specifically ones with quoted strings. I'll have whitespace in >> there and

  1   2   3   4   5   6   7   8   9   10   >