Parenthesize. On Mon, Mar 28, 2022 at 3:50 PM Ethan Furman <et...@stoneleaf.us> wrote:
> In the following bit of code: > > > while s := input.read(MAXBINSIZE): > while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)): > s += ns > line = binascii.b2a_base64(s) > output.write(line) > > I'm getting this error on the second line: > > cannot use assignment expressions with expression > > Can somebody explain why that isn't working? > > Many thanks. > > -- > ~Ethan~ > _______________________________________________ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/3NONJDUTXANBTINCOZITLHOAUDMJ3H66/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/Q3O55IVWRYCNQT7NIG6X3XSOIGLZCZ6P/ Code of Conduct: http://python.org/psf/codeofconduct/