Re: McCabe complexity for just changed files in a commit?

2021-10-02 Thread Chris Angelico
On Sun, Oct 3, 2021 at 3:18 PM Chris Angelico wrote: > git diff-tree 1af743 > 1af743f411aa2b7278d1f1b3c30b447555ea55b8 > :100644 100644 b5908b5a36a4749e0bef2a16a2733a7461a818dc > e00ba8738dbf3421288d31c60de9ee42a085c148 M auto-volume.py > > The first line is the commit hash, and then each subseque

Re: McCabe complexity for just changed files in a commit?

2021-10-02 Thread Chris Angelico
On Sun, Oct 3, 2021 at 3:07 PM Dan Stromberg wrote: > > Hi folks. > > Is there a way of getting the McCabe Complexity of just the functions and > methods (in Python) changed in a git commit? > > I found radon, and it looks good. But I think it wants to do entire files, > no? No idea about the co

McCabe complexity for just changed files in a commit?

2021-10-02 Thread Dan Stromberg
Hi folks. Is there a way of getting the McCabe Complexity of just the functions and methods (in Python) changed in a git commit? I found radon, and it looks good. But I think it wants to do entire files, no? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding the working mechanis of python unary arithmetic operators.

2021-10-02 Thread hongy...@gmail.com
On Saturday, October 2, 2021 at 4:59:54 PM UTC+8, ju...@diegidio.name wrote: > On Saturday, 2 October 2021 at 10:34:27 UTC+2, hongy...@gmail.com wrote: > > See the following testings: > > > > In [24]: a=3.1415926535897932384626433832795028841971 > > In [27]: -a > > Out[27]: -3.141592653589793

Understanding the working mechanis of python unary arithmetic operators.

2021-10-02 Thread hongy...@gmail.com
See the following testings: In [24]: a=3.1415926535897932384626433832795028841971 In [27]: -a Out[27]: -3.141592653589793 In [28]: +a Out[28]: 3.141592653589793 In [17]: ~-+1 Out[17]: 0 In [18]: -~+1 Out[18]: 2 In [19]: -+~1 Out[19]: 2 In [20]: +~-1 Out[20]: 0 I'm very puzzled by these opera

Re: Understanding the working mechanis of python unary arithmetic operators.

2021-10-02 Thread Tony Oliver
On Saturday, 2 October 2021 at 13:48:39 UTC+1, hongy...@gmail.com wrote: > On Saturday, October 2, 2021 at 4:59:54 PM UTC+8, ju...@diegidio.name wrote: > > On Saturday, 2 October 2021 at 10:34:27 UTC+2, hongy...@gmail.com wrote: > > > See the following testings: > > > > > > In [24]: a=3.1415926

Confusing error message: lambda walruses

2021-10-02 Thread Chris Angelico
Using assignment expressions in lambda functions sometimes works, but sometimes doesn't. Python 3.11.0a0 (heads/main:dc878240dc, Oct 3 2021, 10:28:40) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. # Fine if it's a parameter to the lambda function >>>

Re: Definitive guide for Regex

2021-10-02 Thread Barry Scott
> On 1 Oct 2021, at 10:58, Shaozhong SHI wrote: > > Hi, Barry, > > In cases of automating checking, validation and producing reports in the > context of data quality control and giving specific feedback to production > teams, regex is perhaps the only way. > > Perhaps, we can give each ele

Re: Different "look and feel" of some built-in functions

2021-10-02 Thread Oscar Benjamin
On Sat, 25 Sept 2021 at 02:11, Oscar Benjamin wrote: > On Sat, 25 Sept 2021 at 02:01, Chris Angelico wrote: > >> On Sat, Sep 25, 2021 at 10:56 AM Oscar Benjamin >> wrote: >> > >> > On Sat, 25 Sept 2021 at 00:37, Greg Ewing >> > wrote: >> > > I suppose they could be fiddled somehow to make it p