A little source file analyzer

2022-10-26 Thread DFS
Nothing special, but kind of fun to use $python progname.py sourcefile.py - #count blank lines, comments, source code import sys #counters imports, blanks,comments, source = 0,0,0,0 functions, dbexec, total = 0,0,0 #python builtins

Re: Operator: inappropriate wording?

2022-10-26 Thread Weatherby,Gerard
No. If the docs say in one place a comma is not an operator, they shouldn’t call it an operator in another place. I’ve submitted a pull request https://github.com/python/cpython/pull/98736 -- we’ll have to see what The Powers That Be think. From: Python-list on behalf of elas tica Date:

Re: Operator: inappropriate wording?

2022-10-26 Thread Roel Schroeven
elas tica schreef op 26/10/2022 om 21:01: Quotes from The Python Language Reference, Release 3.10.8: - Note that tuples are not formed by the parentheses, but rather by use of the comma operator (p. 66) - Note: If the object is a class instance and the attribute reference occurs on both

Operator: inappropriate wording?

2022-10-26 Thread elas tica
Quotes from The Python Language Reference, Release 3.10.8: - Note that tuples are not formed by the parentheses, but rather by use of the comma operator (p. 66) - Note: If the object is a class instance and the attribute reference occurs on both sides of the assignment operator (p. 86) - The

"mailcap" to be removed (3.13) -- suggested replacement ?

2022-10-26 Thread Karsten Hilbert
Dear list, Python 3.11 marks "mailcap" for removal in 3.13. The documentation speaks about "mimetypes" being a replacement, of sorts. I agree with removing dead batteries. However, I can't really see how "mimetypes" helps in replacing the functionality of "mailcap" ? Put another way: what is

Re: score function in linear regression model

2022-10-26 Thread Thomas Passin
There's a fairly good rundown of score() here: "[Python/Sklearn] How does .score() works?" https://www.kaggle.com/getting-started/27261 On 10/26/2022 2:18 AM, Fatemeh Heydari wrote: On Monday, October 24, 2022 at 7:14:10 AM UTC-7, Reto wrote: On Sun, Oct 23, 2022 at 05:11:10AM -0700, Fatemeh

Re: score function in linear regression model

2022-10-26 Thread Fatemeh Heydari
On Monday, October 24, 2022 at 7:14:10 AM UTC-7, Reto wrote: > On Sun, Oct 23, 2022 at 05:11:10AM -0700, Fatemeh Heydari wrote: > > model.score(X,Y) > > That will basically check how good your model is. > > It takes a bunch of X values with known values, which you provide in Y > and compares

Re: Any PyQt developers here?

2022-10-26 Thread DFS
On 10/25/2022 2:03 PM, Barry Scott wrote: There is an active PyQt mailing list that has lots of helpful and knowledgeable people on it. https://www.riverbankcomputing.com/mailman/listinfo/pyqt Barry Thanks. I'll send some questions their way, I'm sure. --

Re: Any PyQt developers here?

2022-10-26 Thread DFS
On 10/25/2022 1:45 PM, Thomas Passin wrote: On 10/25/2022 1:03 PM, DFS wrote: Having problems with removeRow() on a QTableView object. removeRow() isn't listed as being a method of a QTableView, not even an inherited method, so how are you calling removeRow() on it? (See

Re: Typing: Is there a "cast operator"?

2022-10-26 Thread Peter Otten
On 24/10/2022 05:19, Chris Angelico wrote: On Mon, 24 Oct 2022 at 14:15, Dan Stromberg wrote: I've found that mypy understands simple assert statements. So if you: if f is not None: assert f is not None os.write(f, ...) You might be in good shape. Why can't it simply

[Python-announce] ANN: NumExpr 2.8.4 Release

2022-10-26 Thread Robert McLeod
Announcing NumExpr 2.8.4 Hi everyone, This is a maintenance and bug-fix release for NumExpr. In particular, now we have added Python 3.11 support. Project documentation is available at: http://numexpr.readthedocs.io/ Changes from 2.8.3 to