Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Steven D'Aprano
On Fri, 30 Mar 2018 20:51:22 -0600, Ian Kelly wrote: > On Fri, Mar 30, 2018 at 8:43 PM, Ian Kelly > wrote: >> You really think that 90% of the active users are trolls? And yet the >> subreddit remains usable despite that allegedly terrible >> signal-to-noise ratio. > > I'm now laughing at the im

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Chris Angelico
On Sat, Mar 31, 2018 at 1:51 PM, Ian Kelly wrote: > On Fri, Mar 30, 2018 at 8:43 PM, Ian Kelly wrote: >> You really think that 90% of the active users are trolls? And yet the >> subreddit remains usable despite that allegedly terrible >> signal-to-noise ratio. > > I'm now laughing at the image of

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Ian Kelly
On Fri, Mar 30, 2018 at 8:43 PM, Ian Kelly wrote: > You really think that 90% of the active users are trolls? And yet the > subreddit remains usable despite that allegedly terrible > signal-to-noise ratio. I'm now laughing at the image of a large community of trolls sitting around trolling each o

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Ian Kelly
On Fri, Mar 30, 2018 at 7:10 PM, Rick Johnson wrote: > On Friday, March 30, 2018 at 7:44:40 PM UTC-5, Steven D'Aprano wrote: > [...] >> Reddit's /ruby subreddit: 40,571 subscribers. >> >> Reddit's /python subreddit: 230,858 subscribers. > > Those numbers mean nothing unless you can prove all two-

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Chris Angelico
On Sat, Mar 31, 2018 at 12:10 PM, Rick Johnson wrote: > On Friday, March 30, 2018 at 7:44:40 PM UTC-5, Steven D'Aprano wrote: > [...] >> Reddit's /ruby subreddit: 40,571 subscribers. >> >> Reddit's /python subreddit: 230,858 subscribers. > > Those numbers mean nothing unless you can prove all two-

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Rick Johnson
On Friday, March 30, 2018 at 7:44:40 PM UTC-5, Steven D'Aprano wrote: [...] > Reddit's /ruby subreddit: 40,571 subscribers. > > Reddit's /python subreddit: 230,858 subscribers. Those numbers mean nothing unless you can prove all two- hundred-thirty-odd thousand of them to be active, non- tolling,

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Steven D'Aprano
On Fri, 30 Mar 2018 16:18:57 -0700, Rick Johnson wrote: > My suspicion is that not only are the overall numbers of Python > programmers on the decline Python's popularity went up from #5 to #4 between March 2017 and 2018 on TIOBE: https://www.tiobe.com/tiobe-index/ But of course Rick knows this

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Steven D'Aprano
On Sat, 31 Mar 2018 00:42:31 +0300, Marko Rauhamaa wrote: > Paul Rubin : >> Terry Reedy writes: >>> 2017 25% 2.x, 75% 3.x >>> This is a bigger jump than I anticipated. >> >> It's interesting and surprising. I still have not encountered anyone >> using Python 3 in real life. The main Linux distros

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Steven D'Aprano
On Fri, 30 Mar 2018 11:45:10 -0400, Terry Reedy wrote: > https://www.jetbrains.com/research/python-developers-survey-2017/ “Which > version of Python do you use the most?” > 2014 80% 2.x, 20% 3.x > 2016 60% 2.x, 40% 3.x > 2017 25% 2.x, 75% 3.x > > This is a bigger jump than I anticipated. Thank

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Rick Johnson
On Friday, March 30, 2018 at 10:45:35 AM UTC-5, Terry Reedy wrote: > https://www.jetbrains.com/research/python-developers-survey-2017/ > “Which version of Python do you use the most?” > 2014 80% 2.x, 20% 3.x > 2016 60% 2.x, 40% 3.x > 2017 25% 2.x, 75% 3.x > > This is a bigger jump than I anticipat

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Marko Rauhamaa
Paul Rubin : > Terry Reedy writes: >> 2017 25% 2.x, 75% 3.x >> This is a bigger jump than I anticipated. > > It's interesting and surprising. I still have not encountered anyone > using Python 3 in real life. The main Linux distros still use Python 2 > by default, afaik. I figured Python 3 adoptio

Re: How to fill in a dictionary with key and value from a string?

2018-03-30 Thread MRAB
On 2018-03-30 21:13, C W wrote: Hello all, I want to create a dictionary. The keys are 26 lowercase letters. The values are 26 uppercase letters. The output should look like: {'a': 'A', 'b': 'B',...,'z':'Z' } I know I can use string.ascii_lowercase and string.ascii_uppercase, but how do I use

How to fill in a dictionary with key and value from a string?

2018-03-30 Thread C W
Hello all, I want to create a dictionary. The keys are 26 lowercase letters. The values are 26 uppercase letters. The output should look like: {'a': 'A', 'b': 'B',...,'z':'Z' } I know I can use string.ascii_lowercase and string.ascii_uppercase, but how do I use it exactly? I have tried the foll

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Paul Moore
On 30 March 2018 at 16:45, Terry Reedy wrote: > https://www.jetbrains.com/research/python-developers-survey-2017/ > “Which version of Python do you use the most?” > 2014 80% 2.x, 20% 3.x > 2016 60% 2.x, 40% 3.x > 2017 25% 2.x, 75% 3.x > > This is a bigger jump than I anticipated. Nice! -- https:

Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-30 Thread Terry Reedy
https://www.jetbrains.com/research/python-developers-survey-2017/ “Which version of Python do you use the most?” 2014 80% 2.x, 20% 3.x 2016 60% 2.x, 40% 3.x 2017 25% 2.x, 75% 3.x This is a bigger jump than I anticipated. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-lis

Re: Curious case of UnboundLocalError

2018-03-30 Thread Terry Reedy
On 3/30/2018 7:25 AM, Johannes Bauer wrote: On 30.03.2018 13:13, Ben Bacarisse wrote: import collections class Test(object): def __init__(self): z = { "y": collections.defaultdict(list), This mention of collections refers to ...

Re: please test the new PyPI (now in beta)

2018-03-30 Thread Paul Moore
On 30 March 2018 at 14:38, William Ray Wing wrote: > Sumana, I want to be sure we aren’t just talking past each other. I notice > that the URL you seem to always reference is: > > https://pypi.org/search/ > > and if I go there, I get the filter list immediately. The place I don’t see >

Re: Entering a very large number

2018-03-30 Thread Chris Angelico
On Fri, Mar 30, 2018 at 9:30 PM, bartc wrote: > On 26/03/2018 16:31, Chris Angelico wrote: >> Yeah. It's so annoying that compilers work so hard to make your code >> fast, when all you want to do is measure exactly how slow it is. >> Compiler authors are stupid. > > > In some ways, yes they are. I

Re: Curious case of UnboundLocalError

2018-03-30 Thread Ben Bacarisse
Johannes Bauer writes: > On 30.03.2018 13:13, Ben Bacarisse wrote: > >>> import collections >>> >>> class Test(object): >>> def __init__(self): >>> z = { >>> "y": collections.defaultdict(list), >> >> This mention of collections refers to ... >> >>>

Re: please test the new PyPI (now in beta)

2018-03-30 Thread William Ray Wing
> On Mar 28, 2018, at 10:50 AM, sumana.hariharesw...@gmail.com wrote: > > [byte] > : I ask you the usual list of troubleshooting questions. What OS and browser > are you using, what plugins and particularly interesting preferences are you > using, and so on. (When I turn off JavaScript in m

Re: Entering a very large number

2018-03-30 Thread Richard Damon
On 3/30/18 6:41 AM, bartc wrote: On 27/03/2018 04:49, Richard Damon wrote: On 3/26/18 8:46 AM, bartc wrote: Hence my testing with CPython 3.6, rather than on something like PyPy which can give results that are meaningless. Because, for example, real code doesn't repeatedly execute the same p

Re: Curious case of UnboundLocalError

2018-03-30 Thread Johannes Bauer
On 30.03.2018 13:25, Johannes Bauer wrote: >> This mention of collections refers to ... >> >>> } >>> for (_, collections) in z.items(): >> >> ... this local variable. > > Yup, but why? I mean, at the point of definition of "z", the only > definition of "collections" that w

Re: Curious case of UnboundLocalError

2018-03-30 Thread Chris Angelico
On Fri, Mar 30, 2018 at 9:24 PM, Johannes Bauer wrote: > Hey group, > > I stumbled about something that I cannot quite explain while doing some > stupid naming of variables in my code, in particular using "collections" > as an identifier. However, what results is strange. I've created a > minimal

Re: Curious case of UnboundLocalError

2018-03-30 Thread Johannes Bauer
On 30.03.2018 13:13, Ben Bacarisse wrote: >> import collections >> >> class Test(object): >> def __init__(self): >> z = { >> "y": collections.defaultdict(list), > > This mention of collections refers to ... > >> } >> for (_, collec

Re: Curious case of UnboundLocalError

2018-03-30 Thread Ben Bacarisse
Johannes Bauer writes: > I stumbled about something that I cannot quite explain while doing some > stupid naming of variables in my code, in particular using "collections" > as an identifier. However, what results is strange. I've created a > minimal example. Consider this: > > import collections

Re: Entering a very large number

2018-03-30 Thread bartc
On 27/03/2018 04:49, Richard Damon wrote: On 3/26/18 8:46 AM, bartc wrote: Hence my testing with CPython 3.6, rather than on something like PyPy which can give results that are meaningless. Because, for example, real code doesn't repeatedly execute the same pointless fragment millions of tim

Re: Entering a very large number

2018-03-30 Thread bartc
On 26/03/2018 16:31, Chris Angelico wrote: On Mon, Mar 26, 2018 at 11:46 PM, bartc wrote: On 26/03/2018 13:30, Richard Damon wrote: On 3/26/18 6:31 AM, bartc wrote: The purpose was to establish how such int("...") conversions compare in overheads with actual arithmetic with the resulting

Curious case of UnboundLocalError

2018-03-30 Thread Johannes Bauer
Hey group, I stumbled about something that I cannot quite explain while doing some stupid naming of variables in my code, in particular using "collections" as an identifier. However, what results is strange. I've created a minimal example. Consider this: import collections class Test(object):

Re: Regex Doubts

2018-03-30 Thread Iranna Mathapati
Thanks a lot Antoon. On Fri, Mar 30, 2018 at 2:51 PM, Antoon Pardon wrote: > On 30-03-18 08:16, Iranna Mathapati wrote: > > Hi Team, > > > > > > how to achieve fallowing expected output? > > > > str_output= """ > > > > MOD1 memory : 2 valid1790 free > > MOD2 me

Re: Regex Doubts

2018-03-30 Thread Antoon Pardon
On 30-03-18 08:16, Iranna Mathapati wrote: > Hi Team, > > > how to achieve fallowing expected output? > > str_output= """ > > MOD1 memory : 2 valid1790 free > MOD2 memory : 128 valid 128 free > UDP Aware *MEMR*

Re: Regex Doubts

2018-03-30 Thread Cameron Simpson
On 30Mar2018 11:46, Iranna Mathapati wrote: how to achieve fallowing expected output? str_output= """ MOD1 memory : 2 valid1790 free MOD2 memory : 128 valid 128 free UDP Aware *MEMR*: 0 valid 0 free *

Re: Regex Doubts

2018-03-30 Thread Iranna Mathapati
Hi Cameron. str_output= """ MOD1 memory: 2 valid1790 free MOD2 memory: 128 valid 128 free UDP Aware MEMR : 0 valid0 free *MEMR* : 21 valid 491 free Feature XYZ