Questions tagged [python-3.8]

This tag is for issues that are specific to Python 3.8. For general questions use the more generic [python] and [python-3.x] tags.

Python 3.8 was released on 2019-10-14 (PEP 569).


Use this tag if your question is specifically related to Python 3.8. Otherwise, use the following guidelines to determine which tag(s) you should add to your question:

  • If your question applies to Python in general, use only the tag.
  • If your question applies to Python 3.x but not to Python 2.x, add the tag .
  • If you aren't sure, tag your question with and mention which version you're using in the post.

References

1757 questions
4
votes
1 answer

Python Walrus Operator in While Loops

I'm trying to understand the walrus assignment operator. Classic while loop breaks when condition is reassigned to False within the loop. x = True while x: print('hello') x = False Why doesn't this work using the walrus operator? It ignores…
4
votes
2 answers

`in` defined for generator

Why is in operator defined for generators? >>> def foo(): ... yield 42 ... >>> >>> f = foo() >>> 10 in f False What are the possible use cases? I know that range(...) objects have a __contains__ function defined so that we can do stuff like…
skgbanga
  • 1,915
  • 1
  • 11
  • 20
4
votes
1 answer

What type to use for itertools.count in Python?

I am trying to specify the type of an itertool.count object in Python, like so: from itertools import count c: count = count() However, running mypy yields the following error: test.py:3: error: Function "itertools.count" is not valid as a…
ldbo
  • 85
  • 3
4
votes
3 answers

Python3.8 venv returned exit status 101

I found similar posts, mostly related to linux on venv having an issue with working. python 3.8 venv missing activate command However, I am confused on how to solve it on windows, and what is happening. I installed python3.8 from downloading it on…
001001
  • 327
  • 2
  • 11
4
votes
1 answer

Append list to itself in python

When I have a list, say mylist = ['a', 'b', 'c'] and I try to append it to its self mylist.append(mylist) I get ['a', 'b', 'c', [...]] Which is a recursive list, for example, mylist[3][3][1] outputs 'b' I expected to get ['a', 'b', 'c', ['a',…
loved.by.Jesus
  • 1,365
  • 20
  • 26
4
votes
1 answer

How to add a default array of values ​to ArrayField?

Is it possible to add a default value to ArrayField? I tried to do this for email field, but this did not work: constants.py: ORDER_STATUS_CHANGED = 'order_status_changed' NEW_SIGNAL = 'new_signal' NOTIFICATION_SOURCE = ( …
PrefixEt
  • 43
  • 1
  • 4
4
votes
2 answers

Converting a python 3.8 file to .exe

I've been trying to do so for a while. I followed a tutorial which said you should install pyinstaller first. So, I installed it. Then it said you should write pyinstaller --onefile -w file_name.py in cmd. I had an issue with that as well (there was…
Geut
  • 61
  • 1
  • 1
  • 6
4
votes
2 answers

Error Installing Matplotlib on Python 3.8

RESOLVED: Installing Xcode on my Mac installed all missing dependencies of Matplotlib, thus I was able to successfully install Matplotlib via Terminal. I currently have Python 2.7 and Python 3.8 (downloaded the .dmg via Python.org) on my Mac OS X…
Rook
  • 53
  • 1
  • 6
3
votes
0 answers

Spyder 4.2.5 - iPython Console Not Working With Python 3.8.0

I have installed Python 3.8 & Spyder 4.2.5 on Windows 10 machine. I have changed the Python Interpreter from default to 3.8. After making these changes , iPython console is showing the following error Your Python environment or installation doesn't…
Kamal
  • 117
  • 3
  • 15
3
votes
1 answer

When I use pygame.sprite.spritecollide(), why does only the bullets disappear?

I am making a spaceship game where you control a spaceship. You are supposed to fire bullets to destroy enemy planes. Right now I am trying to make both the bullet and the enemy disappear. But when I ran my game, only the bullets disappeared. Can…
Alan Bagel
  • 357
  • 13
3
votes
1 answer

Can I have one alias for two distinct members of my enum

I sincerely hope, that I followed all the rules and guidelines and that my question/problem is comprehensive enough to find an adequate answer. First, a small intro: For a current project of mine I want to designate specific types to tree node…
TiFe
  • 33
  • 5
3
votes
0 answers

AWS Lambda, Selenium, Headless Chrome incompatible with Python 3.8?

We have a Python app that uses selenium, headless chrome on an AWS Lambda. It worked fine on Python 3.6 and 3.7. When we upgraded to 3.8 it no longer works and is giving us an error "/opt/chromedriver unexpectedly exited." Has anyone been able to…
3
votes
0 answers

hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

I am trying to do simple ssh connect with subprocess but getting following error for python 3.8 windows: hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
nitz
  • 31
  • 1
3
votes
2 answers

Common substring in list of strings

i encountered a problem while trying to solve a problem where given some strings and their lengths, you need to find their common substring. My code for the part where it loops through the list and then each through each word in it is…
geoka
  • 43
  • 6
3
votes
1 answer

dev_appserver.py says Unknown runtime 'python38'

I'm trying to upgrade the GAE runtime on several python projects from python37 to python38. I've used dev_appserver.py to test the apps locally before we deploy but I'm getting an unknown runtime error after changing the runtime to python38. Python…