私はpythonが初めてで、突っついていますが、これに気づきました:
from tkinter import *
def test1():
root = Tk()
txtTest1 = Entry(root).place(x=10, y=10)
print(locals())
def test2():
root = Tk()
txtTest2 = Entry(root)
txtTest2.place(x=10, y=10)#difference is this line
print(locals())
test1()
test2()
出力には次が含まれます。
'txtTest1': None
'txtTest2': <tkinter.Entry object at 0x00EADD70>
None
test1 の代わりにがあるのはなぜ<tkinter.Entry object at ...
ですか?
私はpython 3.2とPyScripterを使用しています。