You are not logged in.
- I've installed Python3.8.0
- run this script: http://ix.io/24pV
- and get this error: http://ix.io/24pU
is this function simply missing from the latest python version? how can I correct that?
Offline
Something like the following?
if hasattr(asyncio, 'ensure_future'):
ensure_future = asyncio.ensure_future
else: # use of async keyword has been Deprecated since Python 3.4.4
ensure_future = asyncio.async
self.faders = [ensure_future(self.fade_to(f, 0)) for f in range(self.grid.width)]
Offline
so I changed inserted your suggested code here: http://ix.io/24ui
but it leads to this error: http://ix.io/24uj
what is your suggestion meant to solve? I guess for the conditions to happen it still needs to no what .async is ? Is .ensure_future supposed to be an alternative to .async?
Offline
What about this instead?
if hasattr(asyncio, 'ensure_future'):
ensure_future = asyncio.ensure_future
else: # use of async keyword has been Deprecated since Python 3.4.4
ensure_future = getattr(asyncio,'async')
self.faders = [ensure_future(self.fade_to(f, 0)) for f in range(self.grid.width)]
Offline