text='Hello'
means you're explicitly passing the value 'Hello'
to a keyword argument text
in the function arguments.
Label(None,'Hello')
means 'Hello'
is passed to the second positional argument in the function definition(no matter what the name of that variable is)
>>> def func(first, second):
... print first, second
...
>>> func('foo', 'text')
foo text
>>> func('foo', second = 'text')
foo text
With keyword arguments the order of calling doesn't matter, but all keyword arguments must come after positional arguments.
>>> def func(first, second, third):
print first, second, third
...
>>> func('foo', third = 'spam', second = 'bar')
foo bar spam
Here first
gets the value 'foo'
because of it's position, while second
and third
got their values because they were passed those values by explicitly using their names.
For more details read docs: http://docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions