Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-16 Thread Sibylle Koczian via Python-list
Am 15.01.2024 um 23:55 schrieb Mats Wichmann via Python-list: On 1/15/24 12:01, Thomas Passin via Python-list wrote: On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: Python from the App Store is not the same as Python from python.org: yes. this question is about the python.org

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
x27;t keep the Form alive after it's been closed. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
n.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-17 3:01 AM, Greg Ewing via Python-list wrote: On 17/01/24 1:01 am, Frank Millman wrote: I sometimes need to keep a reference from a transient object to a more permanent structure in my app. To save myself the extra step of removing all these references when the transient object is

PyTorch

2024-01-17 Thread Alan Zaharia via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-17 Thread Left Right via Python-list
error and work from there. Or, at least, have some monitoring data that suggests that your application memory use increases over time. Otherwise you could be spending a lot of time chasing problems you don't have. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-17 Thread Mats Wichmann via Python-list
On 1/16/24 10:00, Sibylle Koczian via Python-list wrote: Am 15.01.2024 um 23:55 schrieb Mats Wichmann via Python-list: On 1/15/24 12:01, Thomas Passin via Python-list wrote: On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: Python from the App Store is not the same as Python from

Re: PyTorch

2024-01-17 Thread Mats Wichmann via Python-list
On 1/17/24 09:48, Alan Zaharia via Python-list wrote: Hello Python I Need help. it could not be found for PyTorch. It said in the Command Prompt ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch, Can you

Python 3.13.0a3 is now available.

2024-01-17 Thread Thomas Wouters via Python-list
tributions to the Python Software Foundation. Regards from snowy Amsterdam, Your release team, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- Thomas Wouters -- https://mail.python.org/mailman/listinfo/python-list

RE: extend behaviour of assignment operator

2024-01-19 Thread AVI GROSS via Python-list
change the language so it pays attention to what it is giving a pointer too and then goes and tells ... -----Original Message- From: Python-list On Behalf Of Guenther Sohler via Python-list Sent: Tuesday, January 9, 2024 2:15 AM To: [email protected] Subject: extend behaviour of assign

How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
) all_datasets_final.append(all_datasets)return all_datasets_final* If you have a better Pandas approach (unifying all these methods into one that make use of dataframe methods only) please let me know. thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 7:37 AM, marc nicole via Python-list wrote: Hello, I have an initial dataframe with a random list of target cells (each cell being identified with a couple (x,y)). I want to yield four different dataframes each containing the value of one of the contour (surrounding) cells of each

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
cells) target_cells_with_contour = apply_contours(target_cells, contour_cells) datasets = create_possible_datasets(zipf_dataset, target_cells_with_contour) print(datasets) main() Le dim. 21 janv. 2024 à 16:33, Thomas Passin via Python-list < [email protected]> a écrit : > On 1/2

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
r_cells = select_contours(target_cells)     print(contour_cells)     target_cells_with_contour = apply_contours(target_cells, contour_cells)     datasets = create_possible_datasets(zipf_dataset, target_cells_with_contour)     print(datasets) main() Le dim. 21 janv. 2024 à 16:33, Thomas Passin via P

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
It is part of a larger project aiming at processing data according to a given algorithm Do you have any comments or any enhancing recommendations on the code? Thanks. Le dim. 21 janv. 2024 à 18:28, Thomas Passin via Python-list < [email protected]> a écrit : > On 1/21/2024 11:54

Re: How would you name this dictionary?

2024-01-21 Thread Cameron Simpson via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
asic usage. Someone else will probably pitch in. Thanks. Le dim. 21 janv. 2024 à 18:28, Thomas Passin via Python-list mailto:[email protected]>> a écrit : On 1/21/2024 11:54 AM, marc nicole wrote: > Thanks for the reply, > > I think using a Pandas (o

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-23 Thread Sibylle Koczian via Python-list
Am 16.01.2024 um 23:44 schrieb Barry via Python-list: On 16 Jan 2024, at 17:11, Sibylle Koczian via Python-list wrote: while the new Windows 11 machine finds the Microsoft stub You can turn off the stub in windows settings. The magic windows jargon is “App Execution Aliases”. Once you

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-23 Thread Sibylle Koczian via Python-list
Am 17.01.2024 um 19:44 schrieb Mats Wichmann via Python-list: Be interesting to know if your WIndows 10 has those files in place, and it's just a missing path entry (a good thing, perhaps) that's causing it not to be found there. Yes. Python is not on the Path - by design. whi

ANN: eGenix Antispam Bot for Telegram 0.6.0

2024-01-24 Thread eGenix Team via Python-list
Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ -- https://mail.python.org/mailman/listinfo/python-list

Feature proposal: unittest.mock.NAN

2024-01-24 Thread Kerrick Staley via Python-list
d was surprised to find that (as far as I can tell) there is no pre-built solution to this in unittest or pytest. It feels like it should be included in some standard library. - Kerrick -- https://mail.python.org/mailman/listinfo/python-list

Re: Feature proposal: unittest.mock.NAN

2024-01-24 Thread Barry Scott via Python-list
Python ideas are discussed here these days: https://discuss.python.org/ Suggest you raise this there in the Ideas category. Barry > On 24 Jan 2024, at 17:11, Kerrick Staley via Python-list > wrote: > > I think we should define a unittest.mock.NAN constant that can

Re: Await expressions (Posting On Python-List Prohibited)

2024-01-26 Thread Greg Ewing via Python-list
f it helps at all, you can think of an async function as being very similar to a generator, and "await" as being very similar to "yield from". In the current implementation they're almost exactly the same thing underneath. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions (Posting On Python-List Prohibited)

2024-01-26 Thread Chris Angelico via Python-list
On Sat, 27 Jan 2024 at 11:01, Greg Ewing via Python-list wrote: > > If it helps at all, you can think of an async function as being > very similar to a generator, and "await" as being very similar to > "yield from". In the current implementation they're almos

Re: Await expressions (Posting On Python-List Prohibited)

2024-01-27 Thread Dieter Maurer via Python-list
Special provisions are necessary to be able to wait for a value (and meanwhile do other things). `asyncio.sleep` has e.g. this provisions and a call of it is an "awaitable". -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions

2024-01-27 Thread Mild Shock via Python-list
I do not understand: - Which coroutine is suspended? - Which object is the object mentioned? - For what purpose is the value of the primary expression used? - What does it mean to "suspend something on something"? -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions

2024-01-27 Thread Mild Shock via Python-list
mary expression used?    - What does it mean to "suspend something on something"? -- https://mail.python.org/mailman/listinfo/python-list

How to create a binary tree hierarchy given a list of elements as its leaves

2024-01-28 Thread marc nicole via Python-list
chy_name) print used_node_hierarchy_name hierarchies.append(list(zip(node_hierarchy_name, cells_arrays))) -- https://mail.python.org/mailman/listinfo/python-list

Assistance Needed: Corrupted Python Installation Uninstallation Issue

2024-01-29 Thread Syed Hamood via Python-list
[email protected] -- https://mail.python.org/mailman/listinfo/python-list

Re: Assistance Needed: Corrupted Python Installation Uninstallation Issue

2024-01-29 Thread Mats Wichmann via Python-list
On 1/29/24 05:19, Syed Hamood via Python-list wrote: Dear Python.org Support Team, I hope this email finds you well. I am writing to seek assistance with an issue I'm encountering while attempting to uninstall a corrupted Python installation on my system. Details of my system: - Oper

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Fri, 12 Jan 2024, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python books "Python Crash Course,

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, [email protected] wrote: Have you read "https://docs.python.org/3/library/io.html#module-io";? Dieter, No, I hadn't ... but I am reading it now. Many thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread Dieter Maurer via Python-list
Rich Shepard wrote at 2024-1-29 08:15 -0800: > ... >If this explanation is not sufficiently clear I'll re-write it. :-) Have you read "https://docs.python.org/3/library/io.html#module-io";? -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: No, I hadn't ... but I am reading it now. Perhaps I missed the answer to my question when reading the io module. It explains how to open/write/read files of text and binary data, not passing a variable's value from one file

RE: Extract lines from file, add to new files [RESOLVED]

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: I'll keep searching for a solution. IIRC, someone here pointed me to <https://realpython.com/python-send-email/> and I forgot about it ... until now. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread AVI GROSS via Python-list
it and do your thing. Without a bit more specific detail, you may not get more than a suggestion as to how to read in files. -Original Message- From: Python-list On Behalf Of Rich Shepard via Python-list Sent: Monday, January 29, 2024 12:38 PM To: [email protected] Subject: RE

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
/ Avi, I found several web pages describing how to use the python email library and tools to send individual or multiple email messages. I'll learn how to do this based on a couple of detailed examples. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-29 Thread Grant Edwards via Python-list
On 2024-01-29, Rich Shepard via Python-list wrote: > On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: > >> No, I hadn't ... but I am reading it now. > > Perhaps I missed the answer to my question when reading the io module. It > explains how to open/write/rea

Re: Extract lines from file, add to new files

2024-01-29 Thread Thomas Passin via Python-list
On 1/29/2024 11:15 AM, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python books "Python Crash Course,

RE: Extract lines from file, add to new files

2024-01-29 Thread AVI GROSS via Python-list
info. If you have lots of data, reading line after line may be less useful than just using a database and a query. One way to stop feeling frustrated is to stop reading the thread. -Original Message- From: Python-list On Behalf Of Grant Edwards via Python-list Sent: Monday, January 29, 2

Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote: If you aren't going to use one or another existing template system, perhaps the easiest is to use unique strings in the message file. For example: Dear __##so-and-so##__: Please don't write this message off as

Re: Extract lines from file, add to new files

2024-01-30 Thread Larry Martell via Python-list
On Tue, Jan 30, 2024 at 1:13 AM AVI GROSS via Python-list wrote: > > It can be quite frustrating figuring out what someone wants, Grant, > especially when they just change it. > > It is worse when instead of starting a new thread with an appropriate > subject line, it continue

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 8:37 AM, Rich Shepard via Python-list wrote: On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote: If you aren't going to use one or another existing template system, perhaps the easiest is to use unique strings in the message file. For example: Dear __##so-a

RE: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
ones. The only diddling with files that is needed is once to read them into the structure (such as JSON) and perhaps once to write it back out with changes. Good luck, once you decide on a particular method and flesh that out. -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help. Do you want to replace text from values in a file? That's been covered. Do you want to send the messages using those

RE: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, AVI GROSS via Python-list wrote: But seriously, the OP, AKA Rich, is making clear that he is making a tool for his own use. It sounds like he wants to maintain a data repository of his own with some info about his clients and then have the ability to specify a name and pop

Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
just the part you think you are better off using python, namely personalization ? Create personalized files and send them with your trusted mailx solution ? That'll take out wrestling with smptlib et al. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
option for attachments but has none for individual salutations. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
x27; option for attachments but > has none for individual salutations. It doesn't need to. It just sends the (pre-personalized-by-Python) mail files. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: Aw: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Karsten Hilbert wrote: It doesn't need to. It just sends the (pre-personalized-by-Python) mail files. Karsten, In which case, I might as well have Python format and send the messages. :-) Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
are wrestling with Python. Might as well reduce the attack surface. Karsten -- https://mail.python.org/mailman/listinfo/python-list

RE: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
learning how to do things like this well in python can be time well spent as long as you don't tackle too much at a time and get overwhelmed. -Original Message- From: Python-list On Behalf Of Rich Shepard via Python-list Sent: Tuesday, January 30, 2024 12:53 PM To: python-list@pytho

Re: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Mats Wichmann via Python-list
On 1/30/24 14:46, AVI GROSS via Python-list wrote: Rich, You may want to broaden your perspective a bit when people make suggestions. Karsten did not spell out a full design and should not need to. But consider this as a scenario. You want to send (almost) the same message to one or more

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 12:21 PM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help. Do you want to replace text from values in a file? That's be

RE: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
necessarily one best answer. Of course if this was a major product that would be heavily used, sure, you could tweak and optimize. As it is, Rich is getting a chance to improve his python skills no matter which way he goes. -Original Message- From: Python-list On Behalf Of Thomas Passin via

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
t would be heavily used, sure, you could tweak and optimize. As it is, Rich is getting a chance to improve his python skills no matter which way he goes. -Original Message----- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Tuesday, January 30, 2024 10:37 PM To: python-list@

Re: Extract lines from file, add to new files

2024-01-31 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: If I had a script that's been working for 30 years, I'd probably just use Python to do the personalizing and let the rest of the bash script do the rest, like it always has. The Python program would pipe or send the personalize

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
On 1/31/2024 9:05 AM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: If I had a script that's been working for 30 years, I'd probably just use Python to do the personalizing and let the rest of the bash script do the rest, like it alway

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-02 Thread Jon Ribbens via Python-list
”, if you had looked that up. > ><https://docs.python.org/3/glossary.html#term-awaitable> To be fair, I've been using Python for well over quarter of a century, and I never knew it had a glossary. -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
the effort as the standard tools and tricks work and work fast enough. Rich (AKA the OP) seems satisfied with having a solution. It may not be ideal but for his needs, ... -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Wednesday, January 31, 2024 10

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
and maybe garbage collection was not automatic, ... -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Wednesday, January 31, 2024 7:25 AM To: [email protected] Subject: Re: Extract lines from file, add to new files On 1/30/2024 11:25 PM, avi.e.gr

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
a list of lines or a data.frame and use some tools that search all of it and produce results. I find I personally now often lean toward the latter approach but ages ago when memory and CPU were considerations and maybe garbage collection was not automatic, ... -Original Message----- From: Pytho

Re: Extract lines from file, add to new files

2024-02-03 Thread Mats Wichmann via Python-list
On 2/3/24 10:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down the requirements for the program.  Requirements are needed to communicate with other people.  An individual may not need to actually write down the

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
ays! I have participated, like you, in another forum designed for tutoring and I think the rules and expectations there may be a bit different. Over here, it is fairer to expect people to take a bit of time and ask clearer questions. We live and we learn and then Alzheimer's ... -Ori

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
On 2/3/2024 5:02 PM, dn via Python-list wrote: Every trainer, in any field, has to deal with these problems - all the time, and over-and-over. On 4/02/24 06:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
that matter available.) I would not want to program the DES encryption/decryption method in Pascal again! And these days, it seems much better to just find a module or package that meets such needs. Avi -Original Message- From: Python-list On Behalf Of dn via Python-list Sent: Sat

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
ves may also be available <https://docs.python.org/3/library/select.html>. -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
select(2) has limitations. Better to use poll(2). Depending on *nix variant, other more advanced alternatives may also be available <https://docs.python.org/3/library/select.html>. -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
+0100, Mild Shock wrote: ... that works on windows ... You lost me there. -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
at, 3 Feb 2024 00:45:18 +0100, Mild Shock wrote: ... that works on windows ... You lost me there. -- https://mail.python.org/mailman/listinfo/python-list

Error pd.set_option('display.width', 10000)

2024-02-03 Thread gelukt gelukt via Python-list
._oleobj_.Invoke(*(args + (value,) + defArgs)) pywintypes.com_error: (-2147352567, 'Er is een uitzondering opgetreden.', (0, None, None, None, 0, -2147024882), None) Process finished with exit code 1 Kind regards Gelukt -- https://mail.python.org/mailman/listinfo/python-list

PyDev 12.0.0 Released

2024-02-04 Thread Fabio Zadrozny via Python-list
inja2, Html, JavaScript, etc. Links: PyDev: http://pydev.org PyDev Blog: http://pydev.blogspot.com PyDev on VSCode: http://pydev.org/vscode LiClipse: http://www.liclipse.com PyVmMonitor - Python Profiler: http://www.pyvmmonitor.com/ Cheers, Fabio Zadrozny -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.12.2 and 3.11.8 now available.

2024-02-07 Thread Thomas Wouters via Python-list
; or CPython itself <https://github.com/sponsors/python>. Thomas Wouters @thomas <https://discuss.python.org/u/thomas> on behalf of your release team, Ned Deily Steve Dower Pablo Galindo Salgado Łukasz Langa -- https://mail.python.org/mailman/listinfo/python-list

Re: Python misbehavior

2024-02-08 Thread Richard Damon via Python-list
On 2/6/24 10:46 PM, Jim via Python-list wrote: Friends, Please forgive me if this is not the proper forum for dealing with an issue of mine, but I am at a loss in finding a fix for a python problem in the program ClipGrab. The program allows one to download videos or audios from YouTube and

Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Tony Flury via Python-list
generated (or could even generate 'virtual' attributes). -- Anthony Flury email : [email protected] -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Cameron Simpson via Python-list
can define. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Chris Angelico via Python-list
On Fri, 9 Feb 2024 at 17:03, Cameron Simpson via Python-list wrote: > > On 08Feb2024 12:21, [email protected] > wrote: > >I know that mappings by default support the ** operator, to unpack the > >mapping into key word arguments. > > > >Has it been consid

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Alan Bawden via Python-list
_. Pretty easy. - Alan -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Left Right via Python-list
object that behaves like a proper mapping, you could probably file a bug report for that. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Roel Schroeven via Python-list
Left Right via Python-list schreef op 9/02/2024 om 17:09: In order for the "splat" operator to work, the type of the object must populate slot `tp_as_mapping` with a struct of this type: https://docs.python.org/3/c-api/typeobj.html#c.PyMappingMethods and have some non-null implementati

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Left Right via Python-list
are doing this through inheritance, this seems really convoluted: why not just inherit from dict? -- less methods to implement, less stuff to import etc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Cameron Simpson via Python-list
s dict, int, str and namedtuple. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

pytest-logger 1.0.0 released

2024-02-11 Thread Krzysztof Laskowski via Python-list
://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.13.0a4 is now available

2024-02-15 Thread Thomas Wouters via Python-list
eam, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- Thomas Wouters -- https://mail.python.org/mailman/listinfo/python-list

Re: test ignore

2024-02-15 Thread Science Researcher via Python-list
"Science Researcher" wrote in message news:[email protected]... This is a test message - just ignore it That post worked as intended. -- https://mail.python.org/mailman/listinfo/python-list

test ignore

2024-02-15 Thread Science Researcher via Python-list
This is a test message - just ignore it -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-15 Thread Tony Oliver via Python-list
On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: > Test - ignore February 15, 2024 > > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
to comp.lang.python traverse the gateway and show up on this list, then alt.test won't help. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
em for me was always Usenet posters who used fake email addresses.) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-16 Thread Grizzy Adams via Python-list
Thursday, February 15, 2024 at 16:02, Tony Oliver via Python-list wrote: Re: test-ignore (at least in part) >On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: >> Test - ignore February 15, 2024 >> >> Test post to see if my Newsgroup post program is working. >

A question about import

2024-02-16 Thread Gabor Urban via Python-list
Gates, no Windows and an Apache inside. -- https://mail.python.org/mailman/listinfo/python-list

Re: A question about import

2024-02-16 Thread Cameron Simpson via Python-list
On 16Feb2024 20:32, MRAB wrote: On 2024-02-16 20:07, Gabor Urban via Python-list wrote: I need something about modules to be clarified. Suppose I have written a module eg: ModuleA which imports an other module, let us say the datetime. If I import ModuleA in a script, will be datetime

Can one output something other than 'nan' for not a number values?

2024-02-16 Thread Chris Green via Python-list
g string or other sort of cleverness? -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: Can one output something other than 'nan' for not a number values?

2024-02-16 Thread Cameron Simpson via Python-list
e)}') or whatever fits your code. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Using __new__

2024-02-17 Thread Jonathan Gossage via Python-list
) I am quite puzzled as it looks as if this code will not work if the super-class is 'object'. Any suggestions on how to proceed? -- Jonathan Gossage -- https://mail.python.org/mailman/listinfo/python-list

Re: Using __new__

2024-02-18 Thread Mats Wichmann via Python-list
On 2/17/24 19:24, dn via Python-list wrote: On 18/02/24 13:21, Jonathan Gossage wrote: - perhaps someone knows a better/proper way to do this? Suggested research: custom classes, ABCs, and meta-classes... Cure the old "what do you want to accomplish" question. If it's to

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-16, Chris Green via Python-list wrote: > I'm looking for a simple way to make NaN values output as something > like '-' or even just a space instead of the string 'nan'. It would probably help if you told us how you're "outputting" them

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. >>[...] >> >&

Yes - But it had to be specially installed - Feb. 17, 2024

2024-02-18 Thread Science Researcher via Python-list
rnet for valid copies of Windows Live Mail if you are interested in the program. Regards to all -- https://mail.python.org/mailman/listinfo/python-list

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. [...] >> >>

<    38   39   40   41   42   43   44   45   46   47   >