Re: Hat difference between "" and '' in string definition

2017-09-09 Thread Peter Otten
Andrej Viktorovich wrote: > What is difference between string definitions: > s="aaa" > and > s='bbb' There's no difference. It helps you avoid explicit escapes, i. e. >>> "What's up?" "What's up?" is a tad more readable than >>> 'What\'s up' "What's up" Likewise, multiline strings are easier

Re: Key Error: "city"

2017-09-09 Thread Thomas Jollans
On 09/09/17 07:58, V Vishwanathan wrote: > alert = "Today's forecast for {city}: The temperature will range > from{low_temperature} "" to ""{high_temperature}{temperature_unit}Conditions > will be > {weather_conditions}".format(city,low_temperature,high_temperature,temperature_unit,weather_condi

Case Solution: Doing Business in Sierra Leone Graeme Hossie at London Mining (A) by Brian C. Pinkham, Ken Mark

2017-09-09 Thread radhika . rainee76
Solutions of this case study -- https://mail.python.org/mailman/listinfo/python-list

The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Pavol Lisy
Interesting reading: https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 -- https://mail.python.org/mailman/listinfo/python-list

RE: Need to pass a class instance to a gettext fallback

2017-09-09 Thread Josef Meile
Hi Peter >> language = kwargs['language'] >> del kwargs['language'] > >Not really important, but there's a method for that: > >language = kwargs.pop("language") Thanks, this looks better and I indeed think it is important. The "del ..." line looks ugly. >> def __init__(self, *args, **kwargs):

Re: Questions.

2017-09-09 Thread breamoreboy
On Saturday, September 9, 2017 at 4:09:24 AM UTC+1, boB Stepp wrote: > On Fri, Sep 8, 2017 at 9:54 PM, Michael Torrie wrote: > > On 09/08/2017 08:35 PM, V Vishwanathan wrote: > >> Hi, From what I see in the recent 4/5 digests, this forum seems to be for > >> advanced > >> > >> and professional pro

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Terry Reedy
On 9/9/2017 6:31 AM, Pavol Lisy wrote: Interesting reading: https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 So much for Python 3 having killed python ;-) -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Hat difference between "" and '' in string definition

2017-09-09 Thread MRAB
On 2017-09-09 07:43, Andrej Viktorovich wrote: Hello, What is difference between string definitions: s="aaa" and s='bbb' There's no difference. -- https://mail.python.org/mailman/listinfo/python-list

array.array()'s memory shared with multiprocessing.Process()

2017-09-09 Thread iurly
Hi, I'm writing a multiprocessing program whose behavior I don't understand. Essentially, the main process collects data and then passes it to a consumer process. For performance reasons I'm using a "static" circular buffer created through array.array(), and then passing it "as-is" by pushing it

Re: Hat difference between "" and '' in string definition

2017-09-09 Thread Steve D'Aprano
On Sun, 10 Sep 2017 05:47 am, Stefan Ram wrote: > Andrej Viktorovich writes: >>What is difference between string definitions: >>s="aaa" >>and >>s='bbb' > > These two assignment statements differ in their > last five characters. > > Their difference can be calculated thus: > > |>>> int.fr

Re: array.array()'s memory shared with multiprocessing.Process()

2017-09-09 Thread MRAB
On 2017-09-09 22:23, iurly wrote: Hi, I'm writing a multiprocessing program whose behavior I don't understand. Essentially, the main process collects data and then passes it to a consumer process. For performance reasons I'm using a "static" circular buffer created through array.array(), and t

Re: Design: method in class or general function?

2017-09-09 Thread Rick Johnson
On Thursday, September 7, 2017 at 7:16:25 AM UTC-5, Steve D'Aprano wrote: > Python 2.6 is ancient, Enough with your hyperbole! Python 2.6 is no where near being ancient. Python 2.6 is a stable version that gets the job done for many folks in this community. Folks who actually spend their time get

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Gregory Ewing
Pavol Lisy wrote: Interesting reading: https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 So, Python's rate of expansion is accelerating, like the universe. Does that mean there's some kind of dark energy fuelling its growth? -- Greg -- https://mail.python.org/mailman/listinf

Re: Design: method in class or general function?

2017-09-09 Thread Chris Angelico
On Sun, Sep 10, 2017 at 11:37 AM, Rick Johnson wrote: > On Thursday, September 7, 2017 at 7:16:25 AM UTC-5, Steve D'Aprano wrote: >> Python 2.6 is ancient, > > Enough with your hyperbole! Python 2.6 is no where near > being ancient. Python 2.6 is a stable version that gets the > job done for many

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Chris Angelico
On Sun, Sep 10, 2017 at 11:41 AM, Gregory Ewing wrote: > Pavol Lisy wrote: >> >> Interesting reading: >> https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 > > > So, Python's rate of expansion is accelerating, like > the universe. Does that mean there's some kind of dark > energy

Re: Design: method in class or general function?

2017-09-09 Thread Rick Johnson
On Thursday, September 7, 2017 at 7:35:45 AM UTC-5, Ben Finney wrote: > Another, more compelling, reason to follow [Steven's] > advice: Python 2 is in maintenance-only mode and will > receive no support at all in a few years. So what? The OP may not be the type who needs to have his diaper change

Re: Design: method in class or general function?

2017-09-09 Thread Rick Johnson
Marko Rauhamaa wrote: > Ben Finney wrote: > > Another, more compelling, reason to follow that advice: > > Python 2 is in maintenance-only mode and will receive no > > support at all in a few years. It is a dead end. Python 3 > > is actively developed and will be supported indefinitely. > > This re

Re: Design: method in class or general function?

2017-09-09 Thread Rick Johnson
Ben Finney wrote: > leam hall writes: > > > > I've wrestled with that discussion for a while and Python > > 3 loses every time. > > The context of the thread you started was that you are a > *newcomer* to Python. Now you say you've considered Python > 2 versus Python 3 many times? What explains t

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Rustom Mody
On Sunday, September 10, 2017 at 7:12:10 AM UTC+5:30, Gregory Ewing wrote: > Pavol Lisy wrote: > > Interesting reading: > > https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 > > So, Python's rate of expansion is accelerating, like > the universe. Does that mean there's some kind

Re: Using Python 2

2017-09-09 Thread Rick Johnson
Marko Rauhamaa wrote: > The risk to Python will be whether the occasion is > exploited by fanboys of competing programming languages. > The migration from Python 2 might be to something else than > Python 3 in some circles. That has been my observation as well. Python-dev and Python- ideas have be

Re: Using Python 2

2017-09-09 Thread Rick Johnson
Chris Angelico wrote: > And the sky is going to fall on Chicken Little's head, any > day now. Let's see. You can port your code from Python 2.7 > to Python 3.6 by running a script and then checking the > results for bytes/text problems. This is an argument i find interesting: First, the Python3 j

Re: Using Python 2

2017-09-09 Thread Rick Johnson
On Friday, September 8, 2017 at 8:57:56 AM UTC-5, Ned Batchelder wrote: > On 9/8/17 6:12 AM, Leam Hall wrote: > > I've read comments about Python 3 moving from the Zen of Python. I'm a > > "plain and simple" person myself. Complexity to support what CompSci > > folks want, which was used to describ

Re: Using Python 2

2017-09-09 Thread Rick Johnson
On Friday, September 8, 2017 at 9:22:52 AM UTC-5, leam hall wrote: > To say Python 2 is old is true. Old? Yes. Ancient? BS! > What does it matter though? Unless Python 3 provides a > business value for spending lots of time and money to > change then "old" doesn't matter. If the code performs t

Re: Using Python 2

2017-09-09 Thread Rick Johnson
On Friday, September 8, 2017 at 9:41:55 AM UTC-5, Chris Angelico wrote: > False dichotomy. [Python3 was] not a total rewrite, but it > fixes certain long-standing issues. Compatibility had to be > broken in order to change certain behaviours. Namely: maintenance programmers who dared to take a bre

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Gene Heskett
On Saturday 09 September 2017 21:48:44 Chris Angelico wrote: > On Sun, Sep 10, 2017 at 11:41 AM, Gregory Ewing > > wrote: > > Pavol Lisy wrote: > >> Interesting reading: > >> https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb= > >>1 > > > > So, Python's rate of expansion is accele

Re: Using Python 2

2017-09-09 Thread Rick Johnson
On Friday, September 8, 2017 at 10:42:44 AM UTC-5, Steve D'Aprano wrote: > To be perfectly rational, we *should* consider at least > three alternatives: > > (1) Stick with Python 2 and pay for support; > > (2) Migrate to Python 3; > > (3) Re-implement in some other language; > > and make a dis

Re: Using Python 2

2017-09-09 Thread Rick Johnson
Steve D'Aprano wrote: > Chris Angelico wrote: > But some of us can't resist the temptation to evangelise > about Python 3 :-) An error that did not pass silently. Even when explicitly requested. > > Also, be completely honest here: how much work would it > > take for you to move your "millions o

Python programming language vulnerabilities

2017-09-09 Thread Stephen Michell
I chair ISO/IEC/JTC1/SC22/WG23 Programming Language Vulnerabilities. We publish an international technical report, ISO IEC TR 24772 Guide to avoiding programming language vulnerabilities through language selection use. Annex D in this document addresses vulnerabilities in Python. This document i

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Ben Finney
Gene Heskett writes: > On Saturday 09 September 2017 21:48:44 Chris Angelico wrote: > > > The Python Secret Underground emphatically does not exist. > > Humm. here all this time I thought you were a charter member. :) With all the authority vested in me as a charter member, I can categorically s

Re: Using Python 2

2017-09-09 Thread Steve D'Aprano
On Sun, 10 Sep 2017 01:08 pm, Rick Johnson wrote: > Marko Rauhamaa wrote: >> The risk to Python will be whether the occasion is >> exploited by fanboys of competing programming languages. >> The migration from Python 2 might be to something else than >> Python 3 in some circles. > > That has been

Re: Using Python 2

2017-09-09 Thread Steve D'Aprano
On Sun, 10 Sep 2017 02:04 pm, Rick Johnson wrote: > Can you imagine the rage that someone will feel after > climbing up the migration hill from Python2 to Python3, and > then suddenly, hearing the announcement that it's now time > to migrate to Python4? Guido has ruled that Python 4 will not be a