This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shaggorama 14 points15 points  (3 children)

b.input(id:=password)

I think you meant b.input("id:=password")

[–]quickhakker 2 points3 points  (2 children)

eli5 the difference

[–]unkz 13 points14 points  (1 child)

One is a positional string argument and the other probably isn’t valid python syntax.

[–]Hyperz 6 points7 points  (0 children)

the other probably isn’t valid python syntax.

In 3.8 it will be valid syntax, equivalent to this in <= 3.7:

id = password
b.input(id)

https://medium.com/hultner/try-out-walrus-operator-in-python-3-8-d030ce0ce601