On Sun, Nov 22, 2020 at 9:36 AM Paulo da Silva
wrote:
>
> Às 22:18 de 21/11/20, Chris Angelico escreveu:
> > On Sun, Nov 22, 2020 at 9:16 AM Paulo da Silva
> > wrote:
> >>
> >> Hi!
> >>
> >> Why this does not work?!
> >>
> >> from tkinter import *
> >>
> >> def terminate(root):
> >> root.quit
Às 22:18 de 21/11/20, Chris Angelico escreveu:
> On Sun, Nov 22, 2020 at 9:16 AM Paulo da Silva
> wrote:
>>
>> Hi!
>>
>> Why this does not work?!
>>
>> from tkinter import *
>>
>> def terminate(root):
>> root.quit
>>
>
> Is root.quit a function? Simply referencing a function's name does not
>
On Sun, Nov 22, 2020 at 9:16 AM Paulo da Silva
wrote:
>
> Hi!
>
> Why this does not work?!
>
> from tkinter import *
>
> def terminate(root):
> root.quit
>
Is root.quit a function? Simply referencing a function's name does not
call it (because functions are first-class objects - you can put a
Hi!
Why this does not work?!
from tkinter import *
def terminate(root):
root.quit
root=Tk()
#b=Button(root,text="QUIT",command=root.quit)
b=Button(root,text="QUIT",command=lambda: terminate(root))
b.pack()
mainloop()
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
Suppose we write a very simple bi-directional generator in Python:
def share_of_total():
s = 0
new_num = 0
while True:
new_num = yield new_num / (s or 1)
s += new_num
share_calculator = share_of_total()
next(share_calculator) # Without
I cannot update parso because of the rule from jedi:
<0.8.0,>=0.7.0
This kind of things happens more often, but normally in less of a week
the module that prevents another to be installed is updated and the
restriction is lifted.
But I think it is about half a year that this restriction is ac
On 2020-11-19 15:12:39 +, Shelke, Bhushan wrote:
> I have a Tomcat+Java based server exposing REST APIs. I am writing a
> client in python to consume those APIs. Everything is fine until I
> send empty body in POST request. It is a valid use case for us. If I
> send empty body I get 400 bad req