Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-23 Thread Thomas Jollans
On 24/11/17 05:45, Andrew Z wrote: > I have hard time seeing the benefits of this "necessity" , just > unreasonable overcomplications for the name of "diversity". What complications? -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 2:52 PM, Mikhail V wrote: > On Fri, Nov 24, 2017 at 4:13 AM, Chris Angelico wrote: >> On Fri, Nov 24, 2017 at 1:44 PM, Mikhail V wrote: >>> From my above example, you could probably see that I prefer somewhat >>> middle-sized identifiers, one-two syllables. And naturally,

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-23 Thread Andrew Z
I have hard time seeing the benefits of this "necessity" , just unreasonable overcomplications for the name of "diversity". On Nov 23, 2017 22:57, "Ben Finney" wrote: > Ian Kelly writes: > > > On Thu, Nov 23, 2017 at 1:04 PM, Karsten Hilbert > > wrote: > > > Using function arguments writte

Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-23 Thread Ben Finney
Ian Kelly writes: > On Thu, Nov 23, 2017 at 1:04 PM, Karsten Hilbert > wrote: > > Using function arguments written in Thai script ? > > > > Understanding, let alone being able to read, code written in Arabic > > ? > > People are going to write code in Arabic whether you like it or not, > because

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
On Fri, Nov 24, 2017 at 4:13 AM, Chris Angelico wrote: > On Fri, Nov 24, 2017 at 1:44 PM, Mikhail V wrote: >> From my above example, you could probably see that I prefer somewhat >> middle-sized identifiers, one-two syllables. And naturally, they tend to >> reflect some process/meaining, it is no

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 1:44 PM, Mikhail V wrote: > From my above example, you could probably see that I prefer somewhat > middle-sized identifiers, one-two syllables. And naturally, they tend to > reflect some process/meaining, it is not always achievable, > but yes there is such a natural tenden

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
On Thu, Nov 23, 2017 at 10:05 PM, Chris Angelico wrote: > On Fri, Nov 24, 2017 at 8:02 AM, Mikhail V wrote: >> On Thu, Nov 23, 2017 at 9:39 PM, Chris Angelico wrote: >>> On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V wrote: I see you manually 'optimise' the look? I personally would end wi

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Ian Kelly
On Thu, Nov 23, 2017 at 2:19 PM, Richard Damon wrote: > The Unicode Standard provides a fairly good classification of the > characters, and it would make sense to define that an character that is > defined as a 'Letter' or a 'Number', and some classes of Punctuation > (connector and dash) be allow

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Ian Kelly
On Thu, Nov 23, 2017 at 1:04 PM, Karsten Hilbert wrote: > On Thu, Nov 23, 2017 at 08:46:01PM +0100, Thomas Jollans wrote: > >> > I mean for a real practical situation - for example for an average >> > Python programmer or someone who seeks a programmer job. >> > And who does not have a 500-key key

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
On 24/11/17 00:18, Richard Damon wrote: > On 11/23/17 5:45 PM, Thomas Jollans wrote: >> On 23/11/17 23:15, Richard Damon wrote: >>> My thought is you define a legal only those Unicode characters that via >>> the defined classification would be normally legal, but perhaps the >>> first implementatio

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
On 11/23/17 5:45 PM, Thomas Jollans wrote: On 23/11/17 23:15, Richard Damon wrote: My thought is you define a legal only those Unicode characters that via the defined classification would be normally legal, but perhaps the first implementation doesn't diagnose many of the illegal combinations. I

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
On 23/11/17 23:15, Richard Damon wrote: > > My thought is you define a legal only those Unicode characters that via > the defined classification would be normally legal, but perhaps the > first implementation doesn't diagnose many of the illegal combinations. > If that isn't Pythonic, then yes, im

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
On 11/23/17 4:31 PM, Chris Angelico wrote: On Fri, Nov 24, 2017 at 8:19 AM, Richard Damon wrote: On 11/23/17 2:46 PM, Thomas Jollans wrote: On 23/11/17 19:42, Mikhail V wrote: I mean for a real practical situation - for example for an average Python programmer or someone who seeks a programme

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 8:19 AM, Richard Damon wrote: > On 11/23/17 2:46 PM, Thomas Jollans wrote: >> >> On 23/11/17 19:42, Mikhail V wrote: >>> >>> I mean for a real practical situation - for example for an average >>> Python programmer or someone who seeks a programmer job. >>> And who does not

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
On 11/23/17 2:46 PM, Thomas Jollans wrote: On 23/11/17 19:42, Mikhail V wrote: I mean for a real practical situation - for example for an average Python programmer or someone who seeks a programmer job. And who does not have a 500-key keyboard, I don't think it's too much to ask for a programme

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 8:02 AM, Mikhail V wrote: > On Thu, Nov 23, 2017 at 9:39 PM, Chris Angelico wrote: >> On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V wrote: >>> I see you manually 'optimise' the look? >>> I personally would end with something like this: >>> >>> def zip_longest(*A, **K): >>>

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
On Thu, Nov 23, 2017 at 9:39 PM, Chris Angelico wrote: > On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V wrote: >> I see you manually 'optimise' the look? >> I personally would end with something like this: >> >> def zip_longest(*A, **K): >> value = K.get ('fillvalue') >> count = len(a) - 1 >>

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V wrote: > I see you manually 'optimise' the look? > I personally would end with something like this: > > def zip_longest(*A, **K): > value = K.get ('fillvalue') > count = len(a) - 1 > def sentinel(): > nonlocal count > if not co

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
On Thu, Nov 23, 2017 at 8:15 PM, Chris Angelico wrote: > > Let's start with a simpler question. Which of these is better code? > > # == Option 1 > class ZipExhausted(Exception): > pass > > def zip_longest(*args, **kwds): > # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- >

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
On Thu, Nov 23, 2017 at 8:46 PM, Thomas Jollans wrote: > On 23/11/17 19:42, Mikhail V wrote: >> I mean for a real practical situation - for example for an average >> Python programmer or someone who seeks a programmer job. >> And who does not have a 500-key keyboard, > > I don't think it's too muc

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Karsten Hilbert
On Thu, Nov 23, 2017 at 08:46:01PM +0100, Thomas Jollans wrote: > > I mean for a real practical situation - for example for an average > > Python programmer or someone who seeks a programmer job. > > And who does not have a 500-key keyboard, > > I don't think it's too much to ask for a programme

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Thomas Jollans
On 23/11/17 19:42, Mikhail V wrote: > I mean for a real practical situation - for example for an average > Python programmer or someone who seeks a programmer job. > And who does not have a 500-key keyboard, I don't think it's too much to ask for a programmer to have the technology and expertise

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 5:42 AM, Mikhail V wrote: > Chris A wrote: > >>> On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: >>> Chris A wrote: Fortunately for the world, you're not the one who decided which characters were permitted in Python identifiers. The ability to use

Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Mikhail V
Chris A wrote: >> On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: >> >>> Chris A wrote: >>> >>> Fortunately for the world, you're not the one who decided which >>> characters were permitted in Python identifiers. The ability to use >>> non-English words for function/variable names is of huge val

Re: Allow additional separator character in variables

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 1:39 AM, Mikhail V wrote: > Chris A wrote: > > On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: >> >> > Well, then there is some bitter irony in this, so it allows pretty >> > much everything, >> > but does not allow me to beautify code with hyphens. >> > I can fully unde

Re: Python loop and web server (bottle) in the same script

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 1:27 AM, wrote: > I would like to have a script that collects data every minute and at the same > time serve newly collected data as web pages. > > Timely collecting data is more important than serving web pages, so > collecting data should have priority and should never

Re: Allow additional separator character in variables

2017-11-23 Thread Mikhail V
Chris A wrote: On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: > > > Well, then there is some bitter irony in this, so it allows pretty > > much everything, > > but does not allow me to beautify code with hyphens. > > I can fully understand the wish to use non-latin scripts in strings or > > c

Python loop and web server (bottle) in the same script

2017-11-23 Thread zljubisic
I would like to have a script that collects data every minute and at the same time serve newly collected data as web pages. Timely collecting data is more important than serving web pages, so collecting data should have priority and should never be interrupted by serving web pages. My first ide

Re: Finding the module object in Python 3 C extensions (Posting On Python-List Prohibited)

2017-11-23 Thread Jon Ribbens
On 2017-11-23, Lawrence D’Oliveiro wrote: > On Thursday, November 23, 2017 at 4:03:18 AM UTC+13, Jon Ribbens wrote: >> In Python 3, you are supposed to store the global state in an >> allocated memory area instead. > > Says who? Considering that this >

ANN: PyDDF Python Herbst Sprint 2017

2017-11-23 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a Python sprint in Düsseldorf, Germany] ANKÜNDIGUNG PyDDF Python Herbst Sprint 2017 in Düsseldorf Samstag,

Why does asyncio.wait_for() need a timeout?

2017-11-23 Thread Frank Millman
Hi all Below is a simple asyncio loop that runs two background tasks. They both perform a simple count. The first one counts forever, wrapped in a try/except. The second one counts up to 5, then cancels the first one and stops the loop. There are two ways of ensuring that then cancellation i