new match statement and types

2021-03-15 Thread Robin Becker
I'm trying out new features in 3.10.0a6 looking at the new match statement I tried it with various cases. Knowing that the class of a class is 'type' I tried using match to distinguish between classes and instances so I tried various versions of ### class A: pass cl

Re: How to implement logging for an imported module?

2021-03-15 Thread Peter Otten
On 15/03/2021 09:47, Robert Latest via Python-list wrote: Richard Damon wrote: On 3/8/21 4:16 AM, Robert Latest via Python-list wrote: Joseph L. Casale wrote: I couldn't find any information on how to implement logging in a library that doesn't know the name of the application that uses it. Ho

Re: A 35mm film camera represented in Python object

2021-03-15 Thread Robert Latest via Python-list
D.M. Procida wrote: > Hi everyone, I've created - > a representation of a Canonet G-III QL17 in Python. [...] > The Canonet G-III QL17 is one of my favourites. One of my reasons for > writing this code is to appreciate the intricate mechanical logic >

Re: How to implement logging for an imported module?

2021-03-15 Thread Robert Latest via Python-list
Richard Damon wrote: > On 3/8/21 4:16 AM, Robert Latest via Python-list wrote: >> Joseph L. Casale wrote: I couldn't find any information on how to implement logging in a library that doesn't know the name of the application that uses it. How is that done? >>> That's not how it works

Re: Why assert is not a function?

2021-03-15 Thread Robert Latest via Python-list
Chris Angelico (and oters) wrote: [interesting stuff] I'm a late contributor here, but I'd just say: If you'd prefer a function for assert, just define a function that does what you want and be done with it. Much harder to do if assert() were a built-in function but you'd rather have a keyword ;-