Re: on the importance of exceptions

2022-09-06 Thread Meredith Montgomery
Meredith Montgomery writes: > I'm trying to show people that exceptions are a very nice thing to have > when it comes to detecting when something went awry somewhere. I'd like > a real-world case, though. Here's my contribution. I want to handle all errors in main() and the real job is done

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Thomas Passin
Mark Pilgram's "Dive Into Python" was good. Now he's updated it for Python 3: https://diveintopython3.net On 9/6/2022 11:36 AM, Meredith Montgomery wrote: Paul Rubin writes: Meredith Montgomery writes: So that's my request --- any author you find very good has written a book on Python?

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Louis Krupp
On 9/5/2022 8:22 PM, Meredith Montgomery wrote: I never read a book on Python. I'm looking for a good one now. I just searched the web for names such as Charles Petzold, but it looks like he never wrote a book on Python. I also searched for Peter Seibel, but he also never did. I also tried

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Meredith Montgomery writes: > ... >> d = { "name": "Meredith", "email": "mmontgom...@levado.to" } >> return "The name is {name} and the email is {email}".format(**d) >>--8<---cut here---end--->8--- >>Is there a

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Peter J. Holzer
On 2022-09-05 23:22:34 -0300, Meredith Montgomery wrote: > I never read a book on Python. I'm looking for a good one now. I just > searched the web for names such as Charles Petzold, but it looks like he > never wrote a book on Python. I also searched for Peter Seibel, but he > also never did.

on implementing a toy oop-system

2022-09-06 Thread Meredith Montgomery
Just for investigation sake, I'm trying to simulate OO-inheritance. (*) What did I do? I decided that objects would be dictionaries and methods would be procedures stored in the object. A class is just a procedure that creates such object-dictionary. So far so good. Trouble arrived when I

Re: on GNU EMACS's python-mode, loading entire buffer

2022-09-06 Thread Meredith Montgomery
Meredith Montgomery writes: > Meredith Montgomery writes: > > [...] > >> I would also be interested in a command that restarts the REPL afresh >> and reloads my buffer --- sort of like keyboard's [F5] of the IDLE. > > A partial solution for this is the following procedure. > > (defun

Re: on implementing a toy oop-system

2022-09-06 Thread Meredith Montgomery
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Meredith Montgomery writes: >>Is that at all possible somehow? Alternatively, how would you do your >>toy oop-system? > > Maybe something along those lines: > > from functools import partial > > def counter_create( object ): > object[ "n" ]=

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Julio Di Egidio writes: > On Tuesday, 6 September 2022 at 01:03:02 UTC+2, Meredith Montgomery wrote: >> Julio Di Egidio writes: >> > On Monday, 5 September 2022 at 22:18:58 UTC+2, Meredith Montgomery wrote: >> >> r...@zedat.fu-berlin.de (Stefan Ram) writes: >> > >> >> > , but with the

Re: on str.format and f-strings

2022-09-06 Thread Chris Angelico
On Wed, 7 Sept 2022 at 03:52, Meredith Montgomery wrote: > > It seems to me that str.format is not completely made obsolete by the > f-strings that appeared in Python 3.6. But I'm not thinking that this > was the objective of the introduction of f-strings: the PEP at > >

venv and packages with entry points

2022-09-06 Thread c . buhtz
Hello, I try to get it onto my head how virtual environments (via venv) works when I have packages with "entry points". I can define such entry points in the setup.cfg like this (full example [1]): [options.entry_points] console_scripts = hyperorg = hyperorg.__main__:main When I

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Julio Di Egidio writes: > On Monday, 5 September 2022 at 22:18:58 UTC+2, Meredith Montgomery wrote: >> r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> > , but with the spaces removed, it's even one character >> > shorter than the format expression: >> > >> > eval('f"The name is {name} and

on the importance of exceptions

2022-09-06 Thread Meredith Montgomery
I'm trying to show people that exceptions are a very nice thing to have when it comes to detecting when something went awry somewhere. I'd like a real-world case, though. Here's what I'm sort of coming up with --- given my limited experience and imagination. Below, you have f calling g caling

Python-announce] ANN: GF4 Now Has A Plugin Capability

2022-09-06 Thread Thomas Passin
A new plugin capability for the GF4 Waveform Calculator lets a Python file in the new plugins directory add a new command and command button. This is helpful for adding or developing new functionality. Basic information for writing and using plugins is included in the README file in the

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Chris Angelico writes: > On Wed, 7 Sept 2022 at 03:52, Meredith Montgomery > wrote: >> >> It seems to me that str.format is not completely made obsolete by the >> f-strings that appeared in Python 3.6. But I'm not thinking that this >> was the objective of the introduction of f-strings: the

Re: Humour

2022-09-06 Thread alister via Python-list
On Sun, 4 Sep 2022 02:08:20 -0700 (PDT), Ali Muhammad wrote: > Hi python devs it seems you do not have a sense of humour and I am here > to change that please I request to make it so on April 1st you change > the print function to a capital P this will be funny and people will use > language

Re: venv and packages with entry points

2022-09-06 Thread Calvin Spealman
Each virtual environment has its own bin/ directory and when activated its bin/ is in your $PATH On Tue, Sep 6, 2022 at 1:45 PM wrote: > Hello, > > I try to get it onto my head how virtual environments (via venv) works > when I have packages with "entry points". > > I can define such entry

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Meredith Montgomery
Paul Rubin writes: > Meredith Montgomery writes: >> So that's my request --- any author you find very good has written a >> book on Python? > > The ones by David Beazley are great. Same with his non-book writings > about Python. See: http://dabeaz.com/ Distilled Python is looking really

Re: any author you find very good has written a book on Python?

2022-09-06 Thread jkn
On Tuesday, September 6, 2022 at 4:36:38 PM UTC+1, Meredith Montgomery wrote: > Paul Rubin writes: > > > Meredith Montgomery writes: > >> So that's my request --- any author you find very good has written a > >> book on Python? > > > > The ones by David Beazley are great. Same with his

Re: any author you find very good has written a book on Python?

2022-09-06 Thread jkn
On Tuesday, September 6, 2022 at 9:06:31 PM UTC+1, Thomas Passin wrote: > Mark Pilgram's "Dive Into Python" was good. Now he's updated it for > Python 3: like, about ten years ago? (I think Mark Pilgrim dropped off the 'net many years ago...) > https://diveintopython3.net > On 9/6/2022 11:36

on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
It seems to me that str.format is not completely made obsolete by the f-strings that appeared in Python 3.6. But I'm not thinking that this was the objective of the introduction of f-strings: the PEP at https://peps.python.org/pep-0498/#id11 says so explicitly. My question is whether

any author you find very good has written a book on Python?

2022-09-06 Thread Meredith Montgomery
I never read a book on Python. I'm looking for a good one now. I just searched the web for names such as Charles Petzold, but it looks like he never wrote a book on Python. I also searched for Peter Seibel, but he also never did. I also tried to search for Richard Heathfield. (I took a look

[Python-announce] ANN: GF4 Now Has A Plugin Capability

2022-09-06 Thread Thomas Passin
A new plugin capability for the GF4 Waveform Calculator lets a Python file in the new plugins directory add a new command and command button. This is helpful for adding or developing new functionality. Basic information for writing and using plugins is included in the README file in the

RE: any author you find very good has written a book on Python?

2022-09-06 Thread avi.e.gross
Subject: searching for books by an author you like on rather unrelated topics. I am curious if you normally look or books by a writer of Mysteries you like to see if they also wrote Science Fiction or Cookbooks and so on? Having said that, there are plenty of people in the Computer Science field

[Python-announce] PyCA cryptography 38.0.0 released

2022-09-06 Thread Paul Kehrer
PyCA cryptography 38.0.0 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, asymmetric algorithms, message digests, X509, key derivation functions, and much more. We support Python 3.6+,

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Thomas Passin
On 9/6/2022 5:10 PM, jkn wrote: On Tuesday, September 6, 2022 at 9:06:31 PM UTC+1, Thomas Passin wrote: Mark Pilgram's "Dive Into Python" was good. Now he's updated it for Python 3: like, about ten years ago? (I think Mark Pilgrim dropped off the 'net many years ago...) Yes, I thought so

Re: any author you find very good has written a book on Python?

2022-09-06 Thread Dennis Lee Bieber
On Mon, 05 Sep 2022 23:22:34 -0300, Meredith Montgomery declaimed the following: >I never read a book on Python. I'm looking for a good one now. I just >searched the web for names such as Charles Petzold, but it looks like he So far as I know, Petzold is a Windows Internals type

[Python-announce] [ANN] Numba 0.56.1 and llvmlite 0.39.1

2022-09-06 Thread Valentin Haenel
Dear all, in behalf of the Numba team I am happy to announce the patch releases: Numba 0.56.1 and llvmlite 0.39.1. Besides the usual bug fixes, this Numba release adds support for NumPy 1.23. For more information about Numba, please point your browsers at: https://numba.pydata.org/ For more