[RELEASE] Python 3.9.0a5 is now available for testing

2020-03-23 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.0a5. Get it here: https://www.python.org/downloads/release/python-390a5/

Re: `async def` breaks encapsulation?

2020-03-23 Thread Greg Ewing
On 24/03/20 7:25 am, Marco Sulla wrote: But what if you don't need `await`? A coroutine call `mycoro()` could act as the actual `await mycoro()`. If you really want `mycoro()` actual behavior, you could write `async mycoro()`. The way async/await is implemented, it's not feasible to wait until

Re: `async def` breaks encapsulation?

2020-03-23 Thread Marco Sulla
On Tue, 17 Mar 2020 at 08:36, Greg Ewing wrote: > > On 4/03/20 12:52 pm, Marco Sulla wrote: > > Why can't an asynchronous coroutine be simply a coroutine that has an > > `async` or an `await` in its code, without `async` in the signature? > > That wouldn't help as much as you seem to think. You st

Re: How to copy paragraphs (with number formatting) and images from Words (.docx) and paste into Excel (.xlsx) using Python

2020-03-23 Thread Beverly Pope
On Mar 22, 2020, at 11:12 PM, A S wrote: > > On Monday, 23 March 2020 01:58:38 UTC+8, Beverly Pope wrote: >>> On Mar 22, 2020, at 9:47 AM, A S >> > wrote: >>> >>> I can't seem to paste pictures into this discussion so please see both my >>> current and desired Exce

Re: Like c enumeration in python3

2020-03-23 Thread Paulo da Silva
Thank you very much for all your responses! Now I have too much ideas :-) I'm saving your answers and I'll see what is more appropriate/comfortable in my case. Best regards. Paulo -- https://mail.python.org/mailman/listinfo/python-list

Re: Confusing textwrap parameters, and request for RE help

2020-03-23 Thread Dieter Maurer
Chris Angelico wrote at 2020-3-23 06:00 +1100: >When using textwrap.fill() or friends, setting break_long_words=False >without also setting break_on_hyphens=False has the very strange >behaviour that a long hyphenated word will still be wrapped. Having worked with `TeX`, I am familiar that hyphens

Re: Like c enumeration in python3 [ERRATA]

2020-03-23 Thread Terry Reedy
On 3/22/2020 11:37 PM, DL Neil via Python-list wrote: On 23/03/20 3:32 PM, Paulo da Silva wrote: Às 02:18 de 23/03/20, Paulo da Silva escreveu: Hi! Olá, Suppose a class C. I want something like this: class C: KA=0 KB=1 KC=2 ... Kn=n def __init__ ...     ...

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 10:58 PM Frank Millman wrote: > > On 2020-03-23 12:57 PM, Chris Angelico wrote: > > On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: > >> > >> On 2020-03-22 12:11 PM, Chris Angelico wrote: > >>> On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: > > On 202

Re: Like c enumeration in python3

2020-03-23 Thread Barry Scott
> On 23 Mar 2020, at 11:52, Rhodri James wrote: > > On 23/03/2020 02:18, Paulo da Silva wrote: >> Hi! >> Suppose a class C. >> I want something like this: >> class C: >> KA=0 >> KB=1 >> KC=1 >> ... >> Kn=n >> def __init__ ... >> ... >> These constants

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Barry Scott
> On 23 Mar 2020, at 09:02, Frank Millman wrote: > > On 2020-03-22 12:11 PM, Chris Angelico wrote: >> On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: >>> >>> On 2020-03-22 10:45 AM, Chris Angelico wrote: >> If you can recreate the problem with a single socket and multiple >> requests, t

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Frank Millman
On 2020-03-23 12:57 PM, Chris Angelico wrote: On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: On 2020-03-22 12:11 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: On 2020-03-22 10:45 AM, Chris Angelico wrote: If you can recreate the problem with a singl

Re: Like c enumeration in python3

2020-03-23 Thread Rhodri James
On 23/03/2020 02:18, Paulo da Silva wrote: Hi! Suppose a class C. I want something like this: class C: KA=0 KB=1 KC=1 ... Kn=n def __init__ ... ... These constants come from an enum in a .h (header of C file). They are many and

Re: Like c enumeration in python3

2020-03-23 Thread Skip Montanaro
Does the enum module help? https://docs.python.org/3/library/enum.html Note that within __init__ you can reference your enumerated constants using (for example) self.KA. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 8:03 PM Frank Millman wrote: > > On 2020-03-22 12:11 PM, Chris Angelico wrote: > > On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: > >> > >> On 2020-03-22 10:45 AM, Chris Angelico wrote: > > > > If you can recreate the problem with a single socket and multiple > > req

Re: Intermittent bug with asyncio and MS Edge

2020-03-23 Thread Frank Millman
On 2020-03-22 12:11 PM, Chris Angelico wrote: On Sun, Mar 22, 2020 at 8:30 PM Frank Millman wrote: On 2020-03-22 10:45 AM, Chris Angelico wrote: If you can recreate the problem with a single socket and multiple requests, that would be extremely helpful. I also think it's highly likely that t

Re: Like c enumeration in python3 [ERRATA]

2020-03-23 Thread Peter Otten
Paulo da Silva wrote: > Às 02:18 de 23/03/20, Paulo da Silva escreveu: >> Hi! >> >> Suppose a class C. >> I want something like this: >> >> class C: >> KA=0 >> KB=1 > KC=2 >> ... >> Kn=n >> >> def __init__ ... >> ... >> >> >> These constants come from an enum in a .h (header of C file). >> Th