Re: why no camelCase in PEP 8?

2020-05-18 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: > Eli the Bearded <*@eli.users.panix.com> writes: >> One of those is easier to "grep" for than the other. > grep -i might help. Or might not, if I want case sensitivity in the rest of my RE. Elijah -- can, but doesn't want to, build REs that are flexib

Re: why no camelCase in PEP 8?

2020-05-18 Thread Juergen Brendel
On Mon, 2020-05-18 at 19:28 -0400, Dan Sommers wrote: > On Tue, 19 May 2020 09:55:04 +1200 > Juergen Brendel wrote: > > > ... he prefers snake-case. > > That's not snake_case. That's kebab-case.¹ > > ¹ https://wiki.c2.com/?KebabCase :-) -- https://mail.python.org/mailman/listinfo/python-lis

Re: why no camelCase in PEP 8?

2020-05-18 Thread Dan Sommers
On Tue, 19 May 2020 09:55:04 +1200 Juergen Brendel wrote: > ... he prefers snake-case. That's not snake_case. That's kebab-case.¹ ¹ https://wiki.c2.com/?KebabCase -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-18 Thread Juergen Brendel
Hello! We have now moved into a pros/cons discussion of snake vs camel-case, which wasn't the original question. But discussions about coding styles are always fun, so why not... :-) I agree with Eli's reasoning about the grep-ability. It's something that people don't often pay attention to, b

Re: why no camelCase in PEP 8?

2020-05-18 Thread Chris Angelico
On Tue, May 19, 2020 at 7:11 AM Eli the Bearded <*@eli.users.panix.com> wrote: > Here's a simple argument against camel case Here's an even simpler argument. XMLHttpRequest ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-18 Thread Eli the Bearded
In comp.lang.python, Paul Rubin wrote: > I don't know if this was the explicit motivation for PEP 8, but it > has always seemed valid to me: > > https://en.wikipedia.org/wiki/Camel_case#Readability_studies There are three things cited there. One is a NYTimes story from 2009 "Against Camel Case"

Re: Subprocess Popen confusion

2020-05-18 Thread Dick Holmes
In article , __pete...@web.de says... > > Dick Holmes wrote: > > > https://occovid19.ochealthinfo.com/coronavirus-in-oc > > > I'm trying to > > communicate using a continuing dialog between two > > processes on the same system. > > I think pexpect > > https://pexpect.readthedocs.io/en/stable

Re: why no camelCase in PEP 8?

2020-05-18 Thread Chris Angelico
On Tue, May 19, 2020 at 5:51 AM Lance E Sloan wrote: > > I've been using Python for about 18 years. Several things have changed in > the language in those years. I don't disagree with most of it, but one of > the things that annoys me is the disapproval of using camelCase to name > symbols su

why no camelCase in PEP 8?

2020-05-18 Thread Lance E Sloan
I've been using Python for about 18 years. Several things have changed in the language in those years. I don't disagree with most of it, but one of the things that annoys me is the disapproval of using camelCase to name symbols such as variables, functions, etc. I think PEP 8, the "Style Guid

Determining index of range of values in a matrix

2020-05-18 Thread swaroop . sahoo769
Hi All, I am using python for doing the following: I have a matrix which has dimension of 174*993. Each row of the matrix has some numbers in the range of 30-30.5. I would like to determine the index of the numbers in the range of 30-30.5 in each row. I can determine the index of the numbers in ea

Re: Sphinx plugin to make easier-to-navigate class documentation

2020-05-18 Thread Ethan Furman
On 05/18/2020 09:46 AM, Kale Kundert wrote: I'm writing to share a Sphinx plugin I wrote, which I think makes the documentation for large classes much easier to navigate and understand.  The plugin is called `autoclasstoc` and you can find the documentation here: https://autoclasstoc.readthedoc

Sphinx plugin to make easier-to-navigate class documentation

2020-05-18 Thread Kale Kundert
I'm writing to share a Sphinx plugin I wrote, which I think makes the documentation for large classes much easier to navigate and understand.  The plugin is called `autoclasstoc` and you can find the documentation here: https://autoclasstoc.readthedocs.io/en/latest/ I wrote this plugin because, w

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Dieter Maurer
Chris Green wrote at 2020-5-18 11:50 +0100: > ... >So in the particular case where I have a problem sbstrip is "[Ipswich >Recycle]" and the Subject: is "[SPAM] [Ipswich Recycle] OFFER: >Lawnmower (IP11)". The match isn't found, presumably because 'in' is >greedy and sees "[SPAM] [Ipswich Recycle]"

Re: python3 - Import python file as module

2020-05-18 Thread Peter Otten
shivani.shi...@alefedge.com wrote: > Hi, > I am a beginner to Python. I want to achieve the following: > > My directory structure: > > a > └── b > └── c > ├── p > │ └── q > │ └── test.py > └── x > └── y > └── run.py > > In

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Chris Green
Larry Martell wrote: > On Mon, May 18, 2020 at 7:05 AM Chris Green wrote: > > > > I have a strange/minor problem in a Python program I use for mail > > filtering. > > > > One of the ways it classifies messages is by searching for a specific > > string in square brackets [] in the Subject:, the se

python3 - Import python file as module

2020-05-18 Thread shivani . shinde
Hi, I am a beginner to Python. I want to achieve the following: My directory structure: a └── b └── c ├── p │   └── q │   └── test.py └── x └── y └── run.py In my run.py file, I want to import everything from test.py(contains me

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Skip Montanaro
> > Thanks for taking the trouble to look. It's a *bit* difficult to run > in the debugger as the program is a filter triggered by incoming > E-Mail messages. However I think I can fire stuff at it via stdin so > I'll see what I can fathon out doing that. > Cheapo debug trick: When your filter st

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Chris Green
Larry Martell wrote: > On Mon, May 18, 2020 at 7:05 AM Chris Green wrote: > > > > I have a strange/minor problem in a Python program I use for mail > > filtering. > > > > One of the ways it classifies messages is by searching for a specific > > string in square brackets [] in the Subject:, the se

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Larry Martell
On Mon, May 18, 2020 at 7:05 AM Chris Green wrote: > > I have a strange/minor problem in a Python program I use for mail > filtering. > > One of the ways it classifies messages is by searching for a specific > string in square brackets [] in the Subject:, the section of code that > does this is:-

Can one make 'in' ungreedy?

2020-05-18 Thread Chris Green
I have a strange/minor problem in a Python program I use for mail filtering. One of the ways it classifies messages is by searching for a specific string in square brackets [] in the Subject:, the section of code that does this is:- # # # copy the fields from the filter configuratio