FlaskCon: Today Friday 3rd July, Tomorrow and Sunday!

2020-07-03 Thread Abdur-Rahmaan Janhangeer
Greetings List,

FlaskCon is this week!

Speakers include many interesting people such as:

- Dustin Ingram
- Adrian Mönnich (ThiefMaster)

and a host of beautiful topics and diverse mix such as:

- How Google cloud uses Flask
- Demystifying Flask's Application and Request Contexts with pytest
- How the FEC uses Flask to increase transparency in US elections
- Running Flask on Kubernetes

3 , 4 and 5th July!

Today's schedule includes interviews at 15:00 GMT with the authors of
- DTale
- Creatorlist
This is the perfect session for beginners to attend so that FlaskCon is
worth
attending even for non-Flask people

As panelists you have organisers and reviewers like
- David Lord
- Miguel Grinberg
- Grey Li
and others

How to attend? See here:
https://flaskcon.com/#faq

Kind Regards,

Abdur-Rahmaan Janhangeer
compileralchemy  | blog

github 
Mauritius
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Robin Becker


Since explicit is better than implicit :-), I would like to formally ask the Steering Council to answer the following 
questions.


1. Does the Steering Council think political statements have any place in the 
Python repositories?

2. If so, for the avoidance of doubt does the Steering Council support the statements in commit 0c6427d? 
(https://github.com/python/peps/commit/0c6427dcec1e98ca0bd46a876a7219ee4a9347f4)


3. If not, what do they intend to do about the above commit?

If the answer to question 1 is a qualified yes or no, both follow-up questions 
apply.

If the answer to question 1 is a prevarication, non-answer or silence, people will still draw their own conclusions.  I 
mention this merely to reinforce the idea that these things are still answers as well as hostages to fortune.



the above gets +10 from me

according to the telegraph


John Cleese has accused the BBC of “social engineering” after its head of 
comedy said Monty Python’s white Oxbridge males were out of step with modern 
television.


so is there a pep for alternate language names ;)
--
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James

On 02/07/2020 23:46, Random832 wrote:

On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote:

Come again?  I can see no other link in the verbage with the
"relics of white supremacy" that she referred to.  If there are
other links, they should be included in the commit message.  I
agree with Rhodri that an explanation would be interesting.  Far be
it from me to demand one.  So whatever.


It's possible that this wasn't explained clearly enough in the commit
message itself (though I would argue it was definitely adequately
explained in the ensuing on-list discussion, and wonder how much of
that discussion you've actually read), but the point is that the
*whole idea* of "standard English" is tied to white supremacy, not
any particular standard whether via its authors or otherwise.


As I said in my preamble, it doesn't matter whether you believe that is 
true or think it's utter bollocks.  I asked the question to get the 
Steering Council's opinion, not anyone else's.  If you collectively 
really must rehash the arguments again, please have the decency to do so 
in a different thread.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Rhodri James  wrote:
> On 02/07/2020 23:46, Random832 wrote:
>> On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote:
>>> Come again?  I can see no other link in the verbage with the
>>> "relics of white supremacy" that she referred to.  If there are
>>> other links, they should be included in the commit message.  I
>>> agree with Rhodri that an explanation would be interesting.  Far be
>>> it from me to demand one.  So whatever.
>> 
>> It's possible that this wasn't explained clearly enough in the commit
>> message itself (though I would argue it was definitely adequately
>> explained in the ensuing on-list discussion, and wonder how much of
>> that discussion you've actually read), but the point is that the
>> *whole idea* of "standard English" is tied to white supremacy, not
>> any particular standard whether via its authors or otherwise.
>
> As I said in my preamble, it doesn't matter whether you believe that is 
> true or think it's utter bollocks.  I asked the question to get the 
> Steering Council's opinion, not anyone else's.

You don't get to decide whose opinions are offered.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread o1bigtenor
On Thu, Jul 2, 2020 at 7:05 PM Michael Torrie  wrote:
>
> On 7/2/20 4:46 PM, Random832 wrote:
> > It's possible that this wasn't explained clearly enough in the commit
> > message itself (though I would argue it was definitely adequately
> > explained in the ensuing on-list discussion, and wonder how much of
> > that discussion you've actually read), but the point is that the
> > *whole idea* of "standard English" is tied to white supremacy, not
> > any particular standard whether via its authors or otherwise.
>
> Good to know.  Nothing at all was explained in the commit message
> justifying that particular sentence, leaving one unfamiliar with the
> background to wonder what she was referring to.
>
> I definitely agree the words "standard English" are pretty meaningless
> to would-be python developers anyway and the new phrase in the PEP 8 is
> much better.
> --

Given that I have had plenteen (sic) years of education all in the English
language including some instructors trained in the UK and also some
periods of technical education in at least one language other than English
and am quite familiar with the said "Stunk and White - -  *The Elements*
* of Style*" perhaps I could offer some background.

Especially in an upper class year academic education Strunk and White is
quite usually inflicted upon at least all Arts and Humanities kind of
students. They advocate for short pithy sentences, including IIRC a
statement something to the effect of a sentence with more than 5 words
is too long. There are many other amorphisms most of which point out
that such a writing style is perhaps the easiest to understand. As far as
that goes their position is somewhat correct but I have come to very much
differ with their quite heavy handed technique. When one is writing about
very complex topics it is useful to be able to craft complex sentences but
then said authors seemed to think that everything was reducible to a
quite elementary level - - - I have not found that to be true.

A little closer to the intent of the question.
In good documentation reasonable sentences make it much easier to
understand a previously unknown topic or idea. So in that way asking
for writers to at least be aware of if not slavishly follow some so called
'standard of style'. Strunk and White and Kate Turabian have both
published works that are quite accepted in the Arts and the Humanities
as I did not do any graduate training in the Sciences I do not know
what the recommended manuals are in such but in reading plenty
of papers most of the authors would be quite assisted in writing to be
understood rather than to impress.

So I can understand a desire to suggest the usage of a 'Manual of
Style' but I would not be comfortable if it were a requirement.
Languages other than English have different strengths and their
users, when faced with writing documentation in a language that,
even though they are quite comfortable with English, they are not
used to producing what may be possible by a writer who is fully
cognisant with the most rigorous aspects of style, may enhance
said documentation even if said documentation is not 'perfectly
correct in style'. (The previous sentence is an example of what is
possible using complex sentence structure - - - grin!)

I decry the present hypersensitivity to any hint of culture that was
present some 200 years ago especially when such sensitivity is used
to block a wider group from participating. IMO such hypersensitive
individuals might be better served by finding some other soap box
to scream from if that is to be their primary input into a particular
conversation.

HTH

Regards
-- 
https://mail.python.org/mailman/listinfo/python-list


New to python - Just a question

2020-07-03 Thread Daley Okuwa via Python-list

Please can someone help

Write an algorithm (choose the language you prefer) that given a character 
string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of 
characters appearing at least 2 times. In this specific example, it would 
return {‘a’}. Afterwards, comment out the cost in terms of space and time.


Write a bash/python script that takes a directory as an argument and output the 
total lines of code in *.cpp files recursively.


Thanks Daley
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-02, Michael Torrie  wrote:
> On 7/2/20 1:26 PM, Jon Ribbens via Python-list wrote:
>> On 2020-07-02, Michael Torrie  wrote:
>>> Agreed. She just needs to fix her commit message to remove the sentence
>>> about the relics of white supremacy.  The fact she would conflate an
>>> author's name with some kind of race-related thing is a bit
>>> embarrassing, frankly.
>> 
>> She didn't - you did.
>
> Come again?

She didn't - you did.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Bev In TX

> On Jul 3, 2020, at 10:23 AM, o1bigtenor  wrote:
> 
> I decry the present hypersensitivity to any hint of culture that was
> present some 200 years ago especially when such sensitivity is used
> to block a wider group from participating. IMO such hypersensitive
> individuals might be better served by finding some other soap box
> to scream from if that is to be their primary input into a particular
> conversation.

I have worked In harmony with multinational teams from all over the world.  We 
never needed a writing standard for code changes.  Are current Python code 
changes documented in such a poor way that they are not understandable?  That 
would be the only reason to promote a standard, which would not have to be as 
stringent as Strunk and White.

I don’t like the use of the word “racism” in connection with writing standards, 
which is blatantly not true.  Do the current leaders of Python promote 
political agendas?  That’s what this sounds like.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James

On 03/07/2020 15:28, Jon Ribbens via Python-list wrote:

On 2020-07-03, Rhodri James  wrote:

On 02/07/2020 23:46, Random832 wrote:

On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote:

Come again?  I can see no other link in the verbage with the
"relics of white supremacy" that she referred to.  If there are
other links, they should be included in the commit message.  I
agree with Rhodri that an explanation would be interesting.  Far be
it from me to demand one.  So whatever.


It's possible that this wasn't explained clearly enough in the commit
message itself (though I would argue it was definitely adequately
explained in the ensuing on-list discussion, and wonder how much of
that discussion you've actually read), but the point is that the
*whole idea* of "standard English" is tied to white supremacy, not
any particular standard whether via its authors or otherwise.


As I said in my preamble, it doesn't matter whether you believe that is
true or think it's utter bollocks.  I asked the question to get the
Steering Council's opinion, not anyone else's.


You don't get to decide whose opinions are offered.


But I do get to decide whose opinions are solicited.

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: New to python - Just a question

2020-07-03 Thread David Lowry-Duda
Hello!

> Please can someone help
> 
> Write an algorithm (choose the language you prefer) that given a 
> character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print 
> out the list of characters appearing at least 2 times. In this 
> specific example, it would return {‘a’}. Afterwards, comment out the 
> cost in terms of space and time.
> 
> Write a bash/python script that takes a directory as an argument and 
> output the total lines of code in *.cpp files recursively.

These are both pretty classical problems. But the way you've presented 
them sounds a bit like a "do my homework for me" style question.

Do you know any python? I recommend that you consider following a book 
or tutorial to get through some of the basics. I like to recommend Think 
Python (available for free from the author).

If you have particular questions that come up while you're trying to 
write a solution, I think more people would be more inclined to help.

Good luck! - DLD

-- 
David Lowry-Duda  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Ethan Furman

On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote:


She didn't - you did.


Please keep the discourse civil.  Petty taunts are not helpful.

--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Ethan Furman  wrote:
> On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote:
>> She didn't - you did.
>
> Please keep the discourse civil.  Petty taunts are not helpful.

Sorry, I don't understand what you are getting at. My comment was not
a "petty taunt", it was an important factual correction, and perfectly
civil - more so than the post it was a response to.

(I'll concede my second post repeating it in response to "Come again?"
was somewhat facetious though ;-) )
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: New to python - Just a question

2020-07-03 Thread Rhodri James

On 03/07/2020 11:09, Daley Okuwa via Python-list wrote:


Please can someone help

Write an algorithm (choose the language you prefer) that given a character 
string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of 
characters appearing at least 2 times. In this specific example, it would 
return {‘a’}. Afterwards, comment out the cost in terms of space and time.


The first thing to do with any problem is to break it down into bits. 
In the case of Python, writing them out as "pseudo-code" instructions 
often helps.  In this case you have:


Set up something to count letters with
For each letter in the string:
If we haven't seen this letter before:
Set the counter for the letter to 1
Else:
Add 1 to the counter for the letter

For each counter:
If the count is 2 or more:
Print the letter

Now there are a lot of possible ways to write that, but they mostly come 
down to deciding what data structure to use to count letters with.  Have 
a browse through a tutorial (or the standard library if you are feeling 
adventurous) and see what you think might work, then try it.



Write a bash/python script that takes a directory as an argument and output the 
total lines of code in *.cpp files recursively.


In bash, what existing commands count things?  If you don't know, how 
might you find out?  Then you have to figure out how to do that for each 
*.cpp file in a directory, and add the totals together.


In Python, you can read a file one line at a time, so how to count the 
number of lines in a file should be pretty obvious.  Figuring out how to 
do that for every *.cpp file in a directory will involve looking through 
the standard library, or getting a bash script to do it for you :-)


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Michael Torrie
On 7/3/20 10:57 AM, Jon Ribbens via Python-list wrote:
> On 2020-07-03, Ethan Furman  wrote:
>> On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote:
>>> She didn't - you did.
>>
>> Please keep the discourse civil.  Petty taunts are not helpful.
> 
> Sorry, I don't understand what you are getting at. My comment was not
> a "petty taunt", it was an important factual correction, and perfectly
> civil - more so than the post it was a response to.
> 
> (I'll concede my second post repeating it in response to "Come again?"
> was somewhat facetious though ;-) )

All you needed to say was, "No, she did not conflate 'White' with race."
 To say "[I] did," is a very odd thing, and certainly inaccurate. I
definitely did not conflate White with race.  Why do you think that?  As
others helpfully pointed out, the context for her comments was out of
band (not on this list).  Thus she was not conflating anything.  If we
want to go in circles, sure I did conflate that she conflated.

thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Dieter Maurer
Random832 wrote at 2020-7-2 18:46 -0400:
> ... the *whole idea* of "standard English" is tied to white supremacy, not 
> any particular standard whether via its authors or otherwise.

PEP 8 was initially designed as a style specification for
Python's runtime library. I hope we can agree that
all documentation in Python's runtime library should use
(some) standard English - understandable by any typical English speaker
- and not some English dialect spoken and understood only in some
parts of the world.


PEP 8 has been adopted meanwhile by many external projects.
Those projects might choose a different language and
maybe even an English dialect. However, if the project
want to be international, "standard English" (in contrast
to an English dialect) has its advantages.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Terry Reedy

On 7/2/2020 6:46 PM, Random832 wrote:
 how much of that discussion you've actually read), but the point is 
that the *whole idea* of "standard English" is tied to white supremacy, 
not any particular standard whether via its authors or otherwise.


France has the French Academy to protect the purity of the French 
languages and reject foreign words.  Spain similarly has a Royal Academy 
to regulate what is Castilian (Spanish Spanish).  In ancient Bharata 
(India), about 2000 years ago, a 'cabal' of grammatcians, exemplified by 
Panini, defined Sanskrit.  English is much more fluid and much more open 
to including foreign words and influences, including from 'non-white' 
peoples.



--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Jon Ribbens via Python-list
On 2020-07-03, Michael Torrie  wrote:
> On 7/3/20 10:57 AM, Jon Ribbens via Python-list wrote:
>> On 2020-07-03, Ethan Furman  wrote:
>>> On 07/02/2020 07:42 PM, Jon Ribbens via Python-list wrote:
 She didn't - you did.
>>>
>>> Please keep the discourse civil.  Petty taunts are not helpful.
>> 
>> Sorry, I don't understand what you are getting at. My comment was not
>> a "petty taunt", it was an important factual correction, and perfectly
>> civil - more so than the post it was a response to.
>> 
>> (I'll concede my second post repeating it in response to "Come again?"
>> was somewhat facetious though ;-) )
>
> All you needed to say was, "No, she did not conflate 'White' with race."
>  To say "[I] did," is a very odd thing, and certainly inaccurate. I
> definitely did not conflate White with race.  Why do you think that?

Because you conflated the name of the author and race in the post
I was responding to.
-- 
https://mail.python.org/mailman/listinfo/python-list


Making and seeing mistakes [was: Formal Question to Steering Council]

2020-07-03 Thread Ethan Furman

On 07/03/2020 11:57 AM, Jon Ribbens via Python-list wrote:

On 2020-07-03, Michael Torrie  wrote:



All you needed to say was, "No, she did not conflate 'White' with race."
  To say "[I] did," is a very odd thing, and certainly inaccurate. I
definitely did not conflate White with race.  Why do you think that?


Because you conflated the name of the author and race in the post
I was responding to.


That is ridiculous.  It is possible to see someone else's mistake without 
making it oneself.

Michael's mistake was assuming that the author had, in fact, conflated the 
names.

Your mistake is to assume that since the author did not make that mistake that 
Michael must have made it.

I'm sure somebody will point out what my mistake was.

Can we now drop this subthread?

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: New to python - Just a question

2020-07-03 Thread Tim Chase
On 2020-07-03 10:09, Daley Okuwa via Python-list wrote:
> Write an algorithm (choose the language you prefer) that given a
> character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will
> print out the list of characters appearing at least 2 times. In
> this specific example, it would return {‘a’}. Afterwards, comment
> out the cost in terms of space and time.

What have you tried already?  Where are you having trouble?

Have you written a program that accepts a character string?  Is the
string coming in as a command-line argument or on standard-input?

The example string you give looks more like some sort of
serialization format rather than a string.

Are you having difficulty counting the letters?  Python provides a
"dict()" type that would work well.

Should uppercase letters be counted the same as lowercase letters?
I.e., should "Pop" report that there are 2 "p"s?

If you've counted the duplicates, 

Have you studied space/time complexity and do you know how to
evaluate code for these characteristics?  The problem should be
solvable in roughly O(k) per word.

> Write a bash/python script that takes a directory as an argument
> and output the total lines of code in *.cpp files recursively.

Again, what have you tried?

Have you been able to iterated over a directory? See find(1) or ls(1)
or grep(1) in a shell-script or os.listdir()/os.scandir()/glob.glob()
in Python

Have you been able to open those files?

Can you iterate over the lines in each file?

Do you need to filter out any lines (such as blank lines or comments)?

If you provide what you've tried, folks here on the list are pretty
happy to help.  But most won't do your homework for you.

-tkc




-- 
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.9.0b4 is now ready for testing

2020-07-03 Thread Łukasz Langa
On behalf of the entire Python development community, and the currently serving 
Python release team in particular, I’m pleased to announce the release of 
Python 3.9.0b4. Get it here:

https://www.python.org/downloads/release/python-390b4/ 


This is a beta preview of Python 3.9

Python 3.9 is still in development. This release, 3.9.0b4, is the fourth of 
five planned beta release previews.

Beta release previews are intended to give the wider community the opportunity 
to test new features and bug fixes and to prepare their projects to support the 
new feature release.

Call to action

We strongly encourage maintainers of third-party Python projects to test with 
3.9 during the beta phase and report issues found to the Python bug tracker 
 as soon as possible. While the release is planned to 
be feature complete entering the beta phase, it is possible that features may 
be modified or, in rare cases, deleted up until the start of the release 
candidate phase (2020-08-10). Our goal is have no ABI changes after beta 5 and 
as few code changes as possible after 3.9.0rc1, the first release candidate. To 
achieve that, it will be extremely important to get as much exposure for 3.9 as 
possible during the beta phase.

Please keep in mind that this is a preview release and its use is not 
recommended for production environments.

Major new features of the 3.9 series, compared to 3.8

Some of the new major new features and changes in Python 3.9 are:

PEP 584 , Union Operators in dict

PEP 585 , Type Hinting Generics In 
Standard Collections

PEP 593 , Flexible function and 
variable annotations

PEP 602 , Python adopts a stable 
annual release cadence

PEP 615 , Support for the IANA Time 
Zone Database in the Standard Library

PEP 616 , String methods to remove 
prefixes and suffixes

PEP 617 , New PEG parser for CPython

BPO 38379 , garbage collection does not 
block on resurrected objects;

BPO 38692 , os.pidfd_open added that allows 
process management without races and signals;

BPO 39926 , Unicode support updated to 
version 13.0.0;

BPO 1635741 , when Python is initialized 
multiple times in the same process, it does not leak memory anymore;

A number of Python builtins (range, tuple, set, frozenset, list, dict) are now 
sped up using PEP 590  vectorcall;

A number of Python modules (_abc, audioop, _bz2, _codecs, _contextvars, _crypt, 
_functools, _json, _locale, operator, resource, time, _weakref) now use 
multiphase initialization as defined by PEP 489 
;

A number of standard library modules (audioop, ast, grp, _hashlib, pwd, 
_posixsubprocess, random, select, struct, termios, zlib) are now using the 
stable ABI defined by PEP 384 .

(Hey, fellow core developer, if a feature you find important is missing from 
this list, let Łukasz know .)

The next pre-release, the fifth beta release of Python 3.9, will be 3.9.0b5. It 
is currently scheduled for 2020-07-20.

More resources

Online Documentation 
PEP 596 , 3.9 Release Schedule
Report bugs at https://bugs.python.org .
Help fund Python and its community .
Your friendly release team,
Ned Deily @nad 
Steve Dower @steve.dower 
Łukasz Langa @ambv 
-- 
https://mail.python.org/mailman/listinfo/python-list


a bit feedback for JSON documents

2020-07-03 Thread 황병희
There is some comment for
https://docs.python.org/3.10/library/json.html.

The latest RFC number is 8259. 

Thanks,

Sincerely, JSON fan Byung-Hee

-- 
^고맙습니다 _白衣從軍_ 감사합니다_^))//
-- 
https://mail.python.org/mailman/listinfo/python-list