I all, I'm starting study Python and I'm reading many tutorials, python reference, video courses.... So, like many others, I'm learning by examples and I'm trying to improve my skills reading piece of code written by other programmers. At the top of a module of an application that I've been trying to understand there are theese three lines:
...
import tkinter as tk
import tkinter.ttk as ttk
from tkinter import messagebox
...
I do not understand why I've to write the third line because, if I have well understood, messagebox is already imported using the first line of code.
I know that I can call the methods of messagebox directly without the tk.messagebox notation but this way the code is less readable and there are possible namespace conflicts.
As this kind of coding is used in many applications by many different programmers, I was wondering why this is useful: this way, I'm doubling the call to tkinter module.
Regards,
Marco