Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Ethan Furman
On 07/08/2016 10:49 PM, Random832 wrote: On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: hmean and gmean harmonic_mean and geometric_mean The latter, definitely. My preference is also for the latter. However, if the rest of the module is filled with abbreviated names you may as we

Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Random832
On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: > hmean and gmean > > harmonic_mean and geometric_mean The latter, definitely. > Remember that the arithmetic mean is just called "mean". so? (also maybe it shouldn't be?) -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Jussi Piitulainen
Steven D'Aprano writes: > As requested in issue 27181 on the bug tracker, I'm adding functions > to calculate the harmonic and geometric means to the statistics > module. > > I'd like to get a quick show of hands regarding the names. Which do > you prefer? > > hmean and gmean > > harmonic_mean and

Quick poll: gmean or geometric_mean

2016-07-08 Thread Steven D'Aprano
As requested in issue 27181 on the bug tracker, I'm adding functions to calculate the harmonic and geometric means to the statistics module. I'd like to get a quick show of hands regarding the names. Which do you prefer? hmean and gmean harmonic_mean and geometric_mean Remember that the arithm

Re: input vs. readline

2016-07-08 Thread eryk sun
On Sat, Jul 9, 2016 at 12:20 AM, Terry Reedy wrote: > The escape key erasing input back to the beginning of the line is Command > Prompt or cmd.exe behavior. cmd.exe is just a shell that uses the console (if the standard handles are console handles). The console window is hosted by conhost.exe. I

Re: input vs. readline

2016-07-08 Thread eryk sun
On Fri, Jul 8, 2016 at 11:17 PM, John Nagle wrote: > If "readline" is imported, "input" gets "readline" capabilities. > It also loses the ability to import control characters. It doesn't > matter where "readline" is imported; an import in some library > module can trigger this. You can try this

Re: input vs. readline

2016-07-08 Thread cs
I was typing in a hurry. There are several unreadable items below. Let me correct myself... On 09Jul2016 09:45, Cameron Simpson wrote: Perhaps the Windows console is treating ESC specially, apparently as "line erase", discarduing any preceeding text. Hence your results. [...] - accept this, a

Re: input vs. readline

2016-07-08 Thread Terry Reedy
On 7/8/2016 7:17 PM, John Nagle wrote: If "readline" is imported, "input" gets "readline" capabilities. It also loses the ability to import control characters. It doesn't matter where "readline" is imported; an import in some library module can trigger this. You can try this with a simple te

Re: input vs. readline

2016-07-08 Thread cs
On 08Jul2016 16:17, John Nagle wrote: If "readline" is imported, "input" gets "readline" capabilities. It also loses the ability to import control characters. It doesn't matter where "readline" is imported; an import in some library module can trigger this. You can try this with a simple tes

input vs. readline

2016-07-08 Thread John Nagle
If "readline" is imported, "input" gets "readline" capabilities. It also loses the ability to import control characters. It doesn't matter where "readline" is imported; an import in some library module can trigger this. You can try this with a simple test case: print(repr(input())) as a .

Re: Clean Singleton Docstrings

2016-07-08 Thread Ethan Furman
On 07/08/2016 09:57 AM, Rob Gaddi wrote: Michael Selik wrote: On Jul 7, 2016, at 7:46 PM, Rob Gaddi wrote: I've got a package that contains a global ensmartened dict that allows all the various parts of my program to share state. The simplest solution would be to use a module as your singl

Re: Clean Singleton Docstrings

2016-07-08 Thread Rob Gaddi
Michael Selik wrote: > > >> On Jul 7, 2016, at 7:46 PM, Rob Gaddi >> wrote: >> >> I've got a package that contains a global ensmartened dict that allows >> all the various parts of my program to share state. > > The simplest solution would be to use a module as your singleton. For > example, "

Re: Clean Singleton Docstrings

2016-07-08 Thread Rob Gaddi
Steven D'Aprano wrote: > On Fri, 8 Jul 2016 05:38 pm, Peter Otten wrote: > > [...] >>> Is this a thing that can be fixed with a commensurate amount of effort? >> >> There is a test >> >> if not object: >> raise ImportError('no Python documentation found for %r' % thing) >> >> in the pydoc m

Re: Clean Singleton Docstrings

2016-07-08 Thread Steven D'Aprano
On Fri, 8 Jul 2016 05:38 pm, Peter Otten wrote: [...] >> Is this a thing that can be fixed with a commensurate amount of effort? > > There is a test > > if not object: > raise ImportError('no Python documentation found for %r' % thing) > > in the pydoc module. So all you need is to ensure t

Re: Clean Singleton Docstrings

2016-07-08 Thread Rustom Mody
On Friday, July 8, 2016 at 1:15:04 PM UTC+5:30, Peter Otten wrote [slightly edited] > Peter Otten wrote: > > > You might also file a bug report asking to replace > > if not object: ... > > > > with > > > >if object is None: ... > > I take that back; the problem is fixed in Python 3.5. Hoo boy!

Re: Clean Singleton Docstrings

2016-07-08 Thread Peter Otten
Peter Otten wrote: > You might also file a bug report asking to replace I take that back; the problem is fixed in Python 3.5. -- https://mail.python.org/mailman/listinfo/python-list

Re: Clean Singleton Docstrings

2016-07-08 Thread Peter Otten
Rob Gaddi wrote: > I've got a package that contains a global ensmartened dict that allows > all the various parts of my program to share state. Things like device > handles, information about the application environment, etc. that are > inherantly global (i.e. we're not having that debate). > >

CyberRoam Python Alternative for network security

2016-07-08 Thread Arshpreet Singh
This is question more about product information and less technical but Hope It will be use-able at some context, I use Cyeberoam(https://www.cyberoam.com/) Is there any Python alternative available for that? or If I have to write/implement something like this(https://github.com/netkiller/firewal