Re: UTF_16 question

2024-04-29 Thread Richard Damon via Python-list
> On Apr 29, 2024, at 12:23 PM, jak via Python-list > wrote: > > Hi everyone, > one thing that I do not understand is happening to me: I have some text > files with different characteristics, among these there are that they > have an UTF_32_le coding, utf_32be, utf_16_le, utf_16_be all of them

Re: Python misbehavior

2024-02-08 Thread Richard Damon via Python-list
entation for youtube-dlp, you may find that you can use that module directly, and not need the ClipGrab wrapper at all (though it may provide some benefits if you can get it working again). -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread Richard Damon via Python-list
On 12/28/2023 12:20 AM EST rbowman via Python-list <[1]python-list@python.org> wrote: On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: The biggest caveat is that the shared variable MUST exist before it can be examined or used (not surprising).

Context without manager

2023-11-27 Thread Richard Damon via Python-list
Read the Fine context manager documentation. What “with with_expression as var” does is effectively: ob = with_expression var = ob.__enter__() And then at the end of the with, does a ob.__exit__() (With some parameters to __exit__, that could just be None, None, None for the simplest case).

Re: Context without manager

2023-11-27 Thread Richard Damon via Python-list
Read the Fine context manager documentation. What “with with_expression as var” does is effectively: ob = with_expression var = ob.__enter__() And then at the end of the with, does a ob.__exit__() (With some parameters to __exit__, that could just be None, None, None for the simplest case).

Re: type annotation vs working code

2023-10-01 Thread Richard Damon via Python-list
t to True when you initialize), and look it up with getattr() with a default value of False. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Richard Damon via Python-list
> On Aug 17, 2023, at 10:02 AM, c.buhtz--- via Python-list > wrote: > > X-Post: https://stackoverflow.com/q/76913082/4865723 > > I want to display one string in its original source (untranslated) version > and in its translated version site by site without duplicating the string in > the

Re: Multiple inheritance and a broken super() chain

2023-07-03 Thread Richard Damon via Python-list
_init__()* is called twice. What's going on here? Thanks, Peter Because the MRO from Bottom is [Bottom, Left, Right, Top] so super() in Left is Right. It doesn't go to Top as the MRO knows that Right should go to Top, so Left needs to go to Right to init everything, and then Bottom messes things

Re: Problems Installing and getting started.

2023-05-31 Thread Richard Damon
How are you trying to “Open” python? If you get that option screen, that sounds like you are trying to run the installer again. Knowing your Operating System would be very helpful. Python is normally run from the command line, or since you have the PyCharm IDE, it can run python on the program

Re: Addition of a .= operator

2023-05-20 Thread Richard Damon
allow. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Weak Type Ability for Python

2023-04-13 Thread Richard Damon
and if so, converts its value to that type and does the operation. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Richard Damon
ch would be to use the concept of an "abstract base" which allows the base to indicate that a derived class needs to define certain abstract methods, (If you need that sort of support, not defining a method might just mean the subclass doesn't support some optional behavior defined b

Re: Precision Tail-off?

2023-02-17 Thread Richard Damon
of the IEEE. I would like to know their response to it. That is why they have developed the Decimal Floating point format, to handle people with those sorts of problems. They just aren't common enough for many things to have adopted the use of it. Stephen Tucker. -- Richard Damon -- https

Re: evaluation question

2023-02-01 Thread Richard Damon
ode Points, and you can define string literals of that type with U"string" notation. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-02-01 Thread Richard Damon
es if the data is all Latin-1, as a sequence of 16-bit words if the data all fits on th BMP, and a sequence of 32 bit words if it has a value outside the BMP. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: To clarify how Python handles two equal objects

2023-01-11 Thread Richard Damon
hat you still might be just a bit off. -- "Peace cannot be kept by force. It can only be achieved through understanding." -- Albert Einstein -- https://mail.python.org/mailman/listinfo/python-list -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Richard Damon
> On Jan 4, 2023, at 8:56 AM, c.bu...@posteo.jp wrote: > > Hello, > > first I have to say that in my current and fresh humble opinion the > often seen "--verbose" switch in command line applications should > affect only the messages given to the users. This means messages on > "stdout". That

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Richard Damon
 > On Jan 3, 2023, at 10:38 AM, c.bu...@posteo.jp wrote: > Hello, > > this posting isn't about asking for a technical solution. My intention > is to understand the design decision Python's core developers made in > context of that topic. > > The logging module write everything to stderr no

Re: Nonuniform PRNG?

2022-12-07 Thread Richard Damon
, but the new test criteria would need to be computed based on computing the exected results and expected variation in that result, largely based on various cross correlations of the numbers. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get the current set LOG_MASK in Python's syslog module?

2022-09-22 Thread Richard Moseley
According to documentation syslog.setlogmask returns the current mask so save the value to reset later on. Oldval = syslog.setlogmask(newmask) This sets oldval to original mask. On Thu, 22 Sep 2022, 14:32 , wrote: > X-Post: https://stackoverflow.com/q/73814924/4865723 > > Hello, > > I'm aware

Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Richard Damon
rrent x.y object. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand nested loops

2022-08-06 Thread Richard Damon
On 8/6/22 8:12 AM, Chris Angelico wrote: On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote: On 8/6/22 12:01 AM, Chris Angelico wrote: On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote: On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards wrote: In C, this doesn't do what it looks like it's

Re: Trying to understand nested loops

2022-08-06 Thread Richard Damon
enabled that you don't care about, or your code is doing things you have told the complier you shouldn't do. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: 3.11.0b4?

2022-06-24 Thread Richard David
On Friday, June 24, 2022 at 11:36:06 AM UTC-4, Mats Wichmann wrote: > On 6/23/22 07:14, Richard David wrote: > > Is there a new scheduled date for releasing 3.11.0b4? Are there issues with > > b4 that have implications for b3? > > > > I realize it will be released w

Re: 3.11.0b4?

2022-06-24 Thread Richard David
On Thursday, June 23, 2022 at 9:15:19 AM UTC-4, Richard David wrote: > Is there a new scheduled date for releasing 3.11.0b4? Are there issues with > b4 that have implications for b3? > > I realize it will be released when ready and am not trying to push or harass > anyone in

3.11.0b4?

2022-06-23 Thread Richard David
Is there a new scheduled date for releasing 3.11.0b4? Are there issues with b4 that have implications for b3? I realize it will be released when ready and am not trying to push or harass anyone involved. It just seems that versions are usually released on schedule so I'm wondering if there's

Re: Subtract n months from datetime

2022-06-21 Thread Richard Damon
s that often a month later than a given day isn't the same day of the month, but does make some operations less surprising. (This is hard to do to a date expressed as year-month-day, but trivial in some other formats like a timestamp.) -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

PYLAUNCH_DEBUG not printing info

2022-06-08 Thread Richard David
Why am I not getting debug output on my windows 10 machine: C:\temp>\Windows\py.exe -0 -V:3.11 *Python 3.11 (64-bit) -V:3.10 Python 3.10 (64-bit) C:\temp>set PYLAUNCH_DEBUG=1 C:\temp>\Windows\py.exe Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on

Re: Automatic Gain Control in Python?

2022-05-29 Thread Richard Damon
understanding how to grab podcasts. The system is working very well for that. Footnote: “What rhymes with orange?” “No, it doesn’t..” -Original Message- From: Richard Damon On Behalf Of Richard Damon Sent: Saturday, May 28, 2022 11:37 PM To: Steve GS Subject: Re: Automatic Gain Control in

Re: Automatic Gain Control in Python?

2022-05-28 Thread Richard Damon
t the material is surely under Copyright, so be careful what you do with it. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: struggle to upgrade pip on visual studio code

2022-04-22 Thread Richard Damon
ld be able to simpify that to python -m pip install --upgrade -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: No shortcut Icon on Desktop

2022-04-14 Thread Richard Damon
rt of program that makes sense to make a desktop icon for, as it is a command line utility. Perhaps making an icon for IDLE, if it has also been installed, but then the issue becomes would people recognize 'IDLE' as 'Python' to click on. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue47258] Python 3.10 hang at exit in drop_gil() (due to resource warning at exit?)

2022-04-08 Thread Richard Purdie
New submission from Richard Purdie : We had a python hang at shutdown. The gdb python backtrace and C backtraces are below. It is hung in the COND_WAIT(gil->switch_cond, gil->switch_mutex) call in drop_gil(). Py_FinalizeEx -> handle_system_exit() -> PyGC_Collect ->

[issue47139] pthread_sigmask needs SIG_BLOCK behaviour explaination

2022-04-05 Thread Richard Purdie
Richard Purdie added the comment: I think the python code implementing pthread_sigmask already does trigger interrupts if any have been queued before the function returns from blocking or unblocking. The key subtlety which I initially missed is that if you have another thread in your

[issue47195] importlib lock race issue in deadlock handling code

2022-04-02 Thread Richard Purdie
Richard Purdie added the comment: This is a production backtrace after I inserted code to traceback if tid was already in _blocking_on. It is being triggered by a warning about an unclosed asyncio event loop and confirms my theory about nested imports, in the production case I'd guess being

[issue47195] importlib lock race issue in deadlock handling code

2022-04-01 Thread Richard Purdie
New submission from Richard Purdie : We've seen tracebacks in production like: File "", line 1004, in _find_and_load(name='oe.gpg_sign', import_=) File "", line 158, in _ModuleLockManager.__enter__() File "", line 110, in _ModuleLock.acquire() KeyError

[issue47139] pthread_sigmask needs SIG_BLOCK behaviour explaination

2022-03-28 Thread Richard Purdie
New submission from Richard Purdie : I've been struggling to get signal.pthread_sigmask to do what I expected it to do from the documentation. Having looked at the core python code handling signals I now (think?!) I understand what is happening. It might be possible for python to improve

Re: C is it always faster than nump?

2022-02-25 Thread Richard Damon
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 people think that C (or C++) is faster than python, yes I agree, but I think that's not the case with numpy, I believe numpy is faster than

Re: C is it always faster than nump?

2022-02-25 Thread Richard Damon
without that level of care and effort. There are similar package available for many languages, including C/C++ to let mere mortals get efficient numerical processing. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Coding help

2022-02-23 Thread Richard Pullin via Python-list
, Richard -- https://mail.python.org/mailman/listinfo/python-list

[issue45943] kids10yrsap...@gmail.com

2021-11-30 Thread Qualyn Richard
Change by Qualyn Richard : -- components: email files: PSX_20210903_080553.jpg nosy: barry, oktaine57, r.david.murray priority: normal severity: normal status: open title: kids10yrsap...@gmail.com type: behavior versions: Python 3.11 Added file: https://bugs.python.org/file50463

[issue45936] collections.Counter drops key if value is 0 and updating using += operator

2021-11-29 Thread Richard Decal
New submission from Richard Decal : In brief: ``` from collections import Counter x = Counter({'a': 0, 'b': 1}) x.update(x) # works: Counter({'a': 0, 'b': 2}) x += x # expected: Counter({'a': 0, 'b': 3}) actual: Counter({'b': 3}) ``` I expect `+=` and `.update()` to be synonymous. However

Re: frozenset can be altered by |=

2021-11-29 Thread Richard Damon
doesn't support the inplace operator, it is automatically converted into the equivalent assignment with the binary operator? -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Richard Damon
source may still be against the rules (and needs approval), but some think if they can do it and no one complains, it must be ok. On the other hand, they may have given approval, knowing the source. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue42738] subprocess: don't close all file descriptors by default (close_fds=False)

2021-10-26 Thread Richard Xia
Richard Xia added the comment: I'd like to provide another, non-performance-related use case for changing the default value of Popen's close_fds parameters back to False. In some scenarios, a (non-Python) parent process may want its descendant processes to inherit a particular file

[issue37569] Complete your registration to Python tracker

2021-10-24 Thread Richard Hinerfeld
Richard Hinerfeld added the comment: I just get an error when I visit the URL On Sun, Oct 24, 2021 at 4:57 PM Python tracker wrote: > To complete your registration of the user "rhinerfeld1" with > Python tracker, please visit the following URL: > > > https:/

[issue45601] test_tk and test_ttk_guionly fail with resource not availiable

2021-10-24 Thread Richard Hinerfeld
Richard Hinerfeld added the comment: running build_scripts copying and adjusting /home/richard/Python-3.8.9/Tools/scripts/pydoc3 -> build/scripts-3.8 copying and adjusting /home/richard/Python-3.8.9/Tools/scripts/idle3 -> build/scripts-3.8 copying and adjusting /home/richard/Python

[issue45601] test_tk and test_ttk_guionly fail with resource not availiable

2021-10-24 Thread Richard Hinerfeld
New submission from Richard Hinerfeld : Please note that test_tk and test_ttk_guionly fail when running testall when compiling 3.8.9 python from source code. Compiling on Linux Debian 64-bit bullseye 11.1.0 on a 2008 Mac Book. -- components: Build files: TestTK.txt messages: 404942

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-22 Thread Richard van den Berg
Richard van den Berg added the comment: In that case Stijn Hope should create the PR since he wrote the patch. Anyone else could get in trouble for using his code without proper permission. -- ___ Python tracker <https://bugs.python.org/issue5

[issue45487] SSLEOFError regression with certain servers in Python 3.10

2021-10-22 Thread Richard
Richard added the comment: Never mind, I found the root cause after some debugging. Adding AES256-GCM-SHA384 to the cipher string resolved the issue. And now I see that the release notes say this: > The ssl module now has more secure default settings. Ciphers without forward > s

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-22 Thread Richard van den Berg
Richard van den Berg added the comment: Here is the updated patch. Is python5004-test.c enough as a test case? -- Added file: https://bugs.python.org/file50390/python2.7-socket-getfqdn.patch ___ Python tracker <https://bugs.python.org/issue5

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-22 Thread Richard van den Berg
Richard van den Berg added the comment: I just ran into this 12 year old issue. Can this be merged please? -- nosy: +richard.security.consultant ___ Python tracker <https://bugs.python.org/issue5

[issue45487] SSLEOFError regression with certain servers in Python 3.10

2021-10-15 Thread Richard
Richard added the comment: Sorry, I mean it works fine with Python 3.9.2 from apt as well as Python 3.9.7 from pyenv. But 3.10.0 and 3.11-dev from pyenv are broken. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45487] SSLEOFError regression with certain servers in Python 3.10

2021-10-15 Thread Richard
Richard added the comment: Note that the same happens with pyenv-compiled Python 3.9.7 (same way as I compiled 3.10 and 3.11), to rule out issues with different installation methods: ``` ❯ python3.9 -VV Python 3.9.7 (default, Oct 8 2021, 10:30:22) [GCC 10.2.1 20210110

[issue45487] SSLEOFError regression with certain servers in Python 3.10

2021-10-15 Thread Richard
New submission from Richard : Starting in Python 3.10, TLS connections to certain servers (e.g. websocket-cs.vudu.com:443) are failing when it worked fine on Python 3.9 and earlier on the same system. Minimal working example: ``` #!/usr/bin/env python3 import socket import ssl HOST

[issue24132] Direct sub-classing of pathlib.Path

2021-09-16 Thread Richard
Richard added the comment: I agree this would be nice. For now, I'm doing this as a hack: class Path(type(pathlib.Path())): ... -- nosy: +nyuszika7h ___ Python tracker <https://bugs.python.org/issue24

[issue38222] pathlib Path objects should support __format__

2021-09-13 Thread Richard
Richard added the comment: Sorry, that should have been: log_dir = Path('logs/{date}') -- ___ Python tracker <https://bugs.python.org/issue38222> ___ ___ Pytho

[issue38222] pathlib Path objects should support __format__

2021-09-13 Thread Richard
Richard added the comment: I would like for this to be reconsidered. Yes, you can use str(), but converting back and forth becomes really clunky: log_dir = 'logs/{date}' log_file = Path(str(path).format(time.strftime('%Y-%m-%d')) / 'log.txt' -- nosy: +nyuszika7h

Re: on writing a while loop for rolling two dice

2021-09-07 Thread Richard Damon
the order you do things, the cases where the difference is intended is likely fairly small. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue45130] shlex.join() does not accept pathlib.Path objects

2021-09-07 Thread Richard
Richard added the comment: IMO comparing shlex.join() to str.join() is a mistake. Comparing it to subprocess.run() is more appropriate. What do you mean by "proposal"? subprocess.run() already converts Path arguments to str since Python 3.6 (though IIRC this was broken on Windows

[issue45130] shlex.join() does not accept pathlib.Path objects

2021-09-07 Thread Richard
Richard added the comment: While it may be primarily intended to combine output from shlex.split() again, IMO it's useful for manually constructed command lines as well, for example displaying instructions to a user where a path may contain spaces and special characters and needs

[issue45130] shlex.join() does not accept pathlib.Path objects

2021-09-07 Thread Richard
New submission from Richard : When one of the items in the iterable passed to shlex.join() is a pathlib.Path object, it throws an exception saying it must be str or bytes. I believe it should accept Path objects just like other parts of the standard library such as subprocess.run() already

Re: on floating-point numbers

2021-09-05 Thread Richard Damon
> On Sep 5, 2021, at 6:22 PM, Peter J. Holzer wrote: > > On 2021-09-04 10:01:23 -0400, Richard Damon wrote: >>> On 9/4/21 9:40 AM, Hope Rouselle wrote: >>> Hm, I think I see what you're saying. You're saying multiplication and >>> division in IE

[issue45109] pipes seems designed for bytes but is str-only

2021-09-05 Thread Richard Tollerton
New submission from Richard Tollerton : 1. https://github.com/python/cpython/blob/3.9/Lib/pipes.py#L6 > Suppose you have some data that you want to convert to another format, > such as from GIF image format to PPM image format. 2. https://docs.python.org/3.9/library/pipes.html >

Re: Select columns based on dates - Pandas

2021-09-04 Thread Richard Medina
19-01-01 30 > 3 us 2019-02-01 12 > 4 uk 2019-02-01 22 > 5 it 2019-02-01 32 > > With that you could create three dataframes, one per month. > > Thanks, > Martin. > On Thu, Sep 02, 2021 at 12:28:31PM -0700, Richard Medina wrote: > >Hello, forum, > >I have

Re: on floating-point numbers

2021-09-04 Thread Richard Damon
On 9/4/21 9:40 AM, Hope Rouselle wrote: > Chris Angelico writes: > >> On Fri, Sep 3, 2021 at 4:58 AM Hope Rouselle wrote: >>> >>> Hope Rouselle writes: >>> Just sharing a case of floating-point numbers. Nothing needed to be solved or to be figured out. Just bringing up

Select columns based on dates - Pandas

2021-09-02 Thread Richard Medina
Hello, forum, I have a data frame with covid-19 cases per month from 2019 - 2021 like a header like this: Country, 01/01/2019, 2/01/2019, 01/02/2019, 3/01/2019, ... 01/01/2021, 2/01/2021, 01/02/2021, 3/01/2021 I want to filter my data frame for columns of a specific month range of march to

Re: configargparse - reading option from config only

2021-08-27 Thread Richard Damon
On 8/27/21 3:37 AM, Loris Bennett wrote: > Richard Damon writes: > >> On 8/26/21 6:01 AM, Loris Bennett wrote: >>> Hi, >>> >>> When using configargparse, it seems that if a value is to be read from a >>> config file, it also has to be defined as

Re: configargparse - reading option from config only

2021-08-26 Thread Richard Damon
> > Is there an elegant way to do this? > > Cheers, > > Loris > Look at the read() member function to supply the file name to read. Then in the config object there will be sections for each section in the config file. No need for any of these to be 'options' -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: what to do with multiple BOMs

2021-08-19 Thread Richard Damon
By the rules of Unicode, that character, if not the very first character of the file, should be treated as a “zero-width non-breaking space”, it is NOT a BOM character there. It’s presence in the files is almost certainly an error, and being caused by broken software or software processing

[issue42560] Improve Tkinter Documentation

2021-08-17 Thread Richard Sheridan
Change by Richard Sheridan : -- nosy: +Richard Sheridan ___ Python tracker <https://bugs.python.org/issue42560> ___ ___ Python-bugs-list mailing list Unsub

Re: optimization of rule-based model on discrete variables

2021-06-14 Thread Richard Damon
e rule set covers every value in the data array, and never gives one input value two different y values. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue44401] const kwlist for PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords

2021-06-11 Thread Richard
Change by Richard : -- keywords: +patch nosy: +immortalplants nosy_count: 1.0 -> 2.0 pull_requests: +25274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26686 ___ Python tracker <https://bugs.python.org/i

[issue44401] const kwlist for PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords

2021-06-11 Thread Richard Barnes
New submission from Richard Barnes : PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords currently accept `kwlist` as `char **`; however, is not modified by either function. Therefore, a `const char **` might be better since this allows calling code to take advantage of `const

[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-11 Thread Richard Mines
Richard Mines added the comment: If you need a proof that it is possible that locale.LC_MESSAGES doesn't exist, I've attached a screenshot. Even more I'm showing that locale.LC_TIME may be equal to 5 which is a placeholder for locale.LC_MESSAGES if there is an ImportError: https

[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-10 Thread Richard Mines
New submission from Richard Mines : Documentation page: https://docs.python.org/3/library/locale.html#locale.LC_MESSAGES Code comment saying that locale.LC_MESSAGES doesn't exist sometimes: https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L25-L26

Re: learning python ...

2021-05-25 Thread Richard Damon
tate the object the parameter was bound to, the calling function will see the changed object. (This requires the object to BE mutateable, like a list, not an int) If you rebind that parameter to a new object, the calling function doesn't see the change, as its name wasn't rebound. -- Richard D

Re: Unexpected Inheritance Problem

2021-05-20 Thread Richard Damon
On 5/20/21 1:58 AM, Chris Angelico wrote: > On Thu, May 20, 2021 at 2:02 PM Richard Damon > wrote: >> Given the following definition of classes, I am getting an unexpected >> error of : >> >> TypeError: __init__() missing 2 required keyword-only a

Re: Unexpected Inheritance Problem

2021-05-20 Thread Richard Damon
On 5/20/21 3:24 AM, Peter Otten wrote: > On 20/05/2021 06:00, Richard Damon wrote: > >> class GedcomHead(Gedcom0Tag): >> """GEDCOM 0 HEAD tag""" >> def ___init___(self, *, parent): > > An __init__ with three underscores; you m

Unexpected Inheritance Problem

2021-05-19 Thread Richard Damon
too, even though there is a call to it through the super().__init__() Is this expected? Can derived classes not provide values for parameters to construct the base classes? Is there something funny because I am making the call from a member of that base class? -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: for the installation of pycharm

2021-05-08 Thread Richard Damon
On 5/8/21 10:49 AM, mishrasamir2...@gmail.com wrote: >Sir/madam, > >Please provide me the latest version of pycharm quickly. > >Samir Mishra You just need to go to the jetbrains web site and it is available there. They even have a free version there. -- Richard D

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
On 5/6/21 9:44 AM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/6/21 6:12 AM, Jon Ribbens via Python-list wrote: >>> I think you're fundamentally missing the point that the newsgroup is >>> *already gatewayed to the mailing list*.

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
ing a distributed system, doesn't support this model. Either anybody can inject a message from wherever they are, no all messages are sent to be reviewed, the unmoderated and moderated is a VERY sharp line. In Usenet terms, lists like this would be described as loosely robo-moderated. And it works a lot bette

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
On 5/6/21 6:12 AM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/5/21 10:44 PM, Jon Ribbens via Python-list wrote: >>> On 2021-05-06, Richard Damon wrote: >>>> As someone with a long usenet background, converting the existing

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Richard Damon
On 5/5/21 10:44 PM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/5/21 9:40 PM, Jon Ribbens via Python-list wrote: >>> On 2021-05-06, Paul Bryan wrote: >>>> What's involved in moderating c.l.p? Would there be volunteers willing >

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Richard Damon
o it, and people would need to log into the email account on that computer to approve all the posts, or a robot could perhaps be setup to auto-approve most based on some rules. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue43946] unpickling a subclass of list fails when it implements its own extend method

2021-04-26 Thread Richard Levasseur
Richard Levasseur added the comment: Here's a self-contained repro: ``` import pickle class MyList(list): def __init__(self, required, values): self.required = required super().__init__(values) def __getstate__(self): return self.required def __setstate__(self, state

Re: A 35mm film camera represented in Python object

2021-04-01 Thread Richard Damon
On 4/1/21 6:41 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: > On 2021-04-01 at 18:10:46 -0400, > Richard Damon wrote: > >> On 4/1/21 5:47 PM, D.M. Procida wrote: >>> D.M. Procida wrote: >>> >>>> Hi everyone, I've created <https://github.com/

Re: A 35mm film camera represented in Python object

2021-04-01 Thread Richard Damon
determines that of B which > determines that of C which determines that of D which finally also > affects the movement of A. > > Any thoughts or wise ideas? > > Daniele If you keep track of the positions as a floating point number, the precision will be more than you could actually measure it. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Richard Damon
ay it is written, "Python's".istitle() is False, as the s at the end needs to be uppper case to satisfy as ' is uncased, so the next cased character must be upper case. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 10:28 PM, Chris Angelico wrote: > On Mon, Mar 22, 2021 at 12:26 PM Richard Damon > wrote: >> On 3/21/21 7:31 PM, MRAB wrote: >>> On 2021-03-21 22:30, Chris Angelico wrote: >>>> On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards >>>> wrot

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
; > title(self, /) >     Return a version of the string where each word is titlecased. > >     More specifically, words start with uppercased characters and all > remaining >     cased characters have lower case. > > '\N{LATIN CAPITAL LETTER DZ}', '\N{LATIN SMALL LETTER DZ}' and > '\N{LATIN CAPITAL LETTER D WITH SMALL LETTER Z}' are all digraphs, so > is it correct to say that .title() uppercases the first character? > Kind of. I think the clarification calling them upper cased characters is close enough considering that there are only 31 title cased characters, all digraphs. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
One important thing to remember is that there ARE a few characters that are themselves 'Title case', so we can't live with just upper and lower. These all are 'digraphs', i.e. look like two letters, but this glyph does act as a single character for many purposes. One example that has been given i

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
itle() function is basically an intentionally 80% solution. It handles the simple cases simply, and if you might have the more complicated cases, you have to handle that yourself because to specify what the 'right' answer would be is basically impossible to do in general (because there are conflicting d

Re: Why assert is not a function?

2021-03-13 Thread Richard Damon
On 3/12/21 8:58 AM, Chris Angelico wrote: > On Sat, Mar 13, 2021 at 12:11 AM Richard Damon > wrote: >> On 3/12/21 12:31 AM, Chris Angelico wrote: >>> On Fri, Mar 12, 2021 at 3:53 PM Cameron Simpson wrote: >>>> For me, try/except is for when something might rea

Re: Why assert is not a function?

2021-03-12 Thread Richard Damon
r'. It is reasonable to skip the input assert if it becomes too expensive for benefit it provides, or if something else will catch the error. This likely actually applies to a lot of Python code, so it may seem that it doesn't apply. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Button placement

2021-03-09 Thread Richard Damon
earing when fighting with it with padding lol. > > -- > Thanks One thing to remember is that span is sort of like range, range(3) is [0, 1, 2] -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: How to implement logging for an imported module?

2021-03-08 Thread Richard Damon
a different value. General convention is that modules will use their name as the name of their logger, as that is generally unique. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter long-running window freezes

2021-02-25 Thread Richard Damon
ing it each time.  Simplest is probably to link the Label to a StringVar instead of a fixed text and updating the variable to change the text. You can also (I believe) go into the Label and change the text it has with a configuration call. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[issue43273] Mock `_mock_wraps` is undocumented and inconsistently named

2021-02-20 Thread Richard Wise
New submission from Richard Wise : I am trying to use wraps to delegate a call to a decorated patch mock to another method. By examining the source code, I was able to achieve this using the (apparently undocumented) `Mock._mock_wraps` attribute instead of the `wraps` attribute which would

  1   2   3   4   5   6   7   8   9   10   >